This project is read-only.

develop a service question?

Topics: Project Management Forum, User Forum
Jan 28, 2011 at 6:06 AM
Edited Jan 28, 2011 at 6:07 AM

when i develop a service ,i meet the error :

Error 1 The command "touch C:\ESB\Dev\Source\ESB\LobSystems\lcs\Ctx\MyFirstService\..\..\..\..\Base\Management\ESB.Management.Portal\web.config
touch "C:\ESB\Dev\Source\ESB\LobSystems\lcs\Ctx\MyFirstService\..\..\..\..\Base\TransportAdaptors\Esb.Core.Adaptors.Transport.Internet.Receive.Wcf\web.config"
touch "C:\ESB\Dev\Source\ESB\LobSystems\lcs\Ctx\MyFirstService\..\..\..\..\Base\TransportAdaptors\Esb.Core.Adaptors.Transport.Internet.Receive.WSE3\web.config"
" exited with code 9009. MyFirstService

Jan 28, 2011 at 6:10 AM

Hi, please follow the development setup instructions at:

http://keystrokeesbnet.codeplex.com/wikipage?title=%5bDevelopment%5d&referringTitle=Installation

Specifically, point 1

  1. Add the "C:\ESB\Dev\Source\ESB\Base\Bin\Tools\" directory to your system path, or copy the "Touch.exe" file to a directory in your system path.

is required.

Cheers

Jan 28, 2011 at 6:33 AM
Edited Jan 30, 2011 at 8:06 AM

thanks ,it's ok.the directory is changed.

the right command is:

touch $(SolutionDir)\Manage\EMC\web.config
touch "$(SolutionDir)\Transports\Esb.Core.Adaptors.Transport.Internet.Receive.Wcf\web.config"
touch "$(SolutionDir)\Transports\Esb.Core.Adaptors.Transport.Internet.Receive.Wse3\web.config"

Jan 28, 2011 at 10:06 AM

i hava another question. when i create a service via project template,such as the service name is  myfirstservice.

i don't search this service in esb management console. i refer the instructions at :

http://keystrokeesbnet.codeplex.com/wikipage?title=Service%20development%20process%20overview&referringTitle=Documentation

Jan 28, 2011 at 1:52 PM

Can you see the service if you follow the instructions in the Getting Started Guide? ( http://keystrokeesbnet.codeplex.com/wikipage?title=Getting%20started&referringTitle=Getting%20started%20guides )

In your ESB.NET instance:
(say) http://localhost/esb/source/manage

  1. Login (uid=admin, pwd=admin)
  2. Select Dynamic Service Catalog from the navigation tree, or Service Catalog from the Quick links.
  3. View or search for your service (by service name).

 

For more information, view the following video for a quick overview on how to manage and invoke your service.

http://keystrokeesbnet.codeplex.com/releases/45387/download/125747

Cheers

Jan 30, 2011 at 3:40 AM

thanks,it's ok.

if i want to develop the service by another computer which don't deploy esb management console.how can i do?

Jan 30, 2011 at 5:42 AM

Now i  am  doing a test  service.The service  supply a function, like the following method:

public string Hello(string  aUserName)

{

    return  "Hello,"+aUserName;

}

i want to do it as a service via esb management console,then the client use this service.How can i via esb management console finish this job ?

Jan 30, 2011 at 9:15 AM
zxpsky wrote:

thanks,it's ok.

if i want to develop the service by another computer which don't deploy esb management console.how can i do?

The EMC is usually deployed on each instance of ESB.NET.

If you wish to invoke the service from another ESB Management Console (EMC) instance, do the following:

1) In the local (first) EMC, go to the Dynamic Service Catalog page, select the service and click Sample Request.

2) Copy the service request message XML from the local (first) EMC onto the remote(second) EMC.

3) On the remote (second) EMC, in the EMC URL and Transport Settings tab, change the endpoint of the service to point to your first ESB instance.

from something like: http://localhost/ESB/Source/CoreInternetTransportAdaptors/Wcf/ESBSoapXmlDocTransport.svc/Default

to something like: http://Secondhost/ESB/Instance2/CoreInternetTransportAdaptors/Wcf/ESBSoapXmlDocTransport.svc/Default

Now execute the request from the second EMC and it should be sending the request to the first ESB instance.

 

Cheers

 

Jan 30, 2011 at 9:20 AM
zxpsky wrote:

Now i  am  doing a test  service.The service  supply a function, like the following method:

public string Hello(string  aUserName)

{

    return  "Hello,"+aUserName;

}

i want to do it as a service via esb management console,then the client use this service.How can i via esb management console finish this job ?

zxpsky, sorry, I didn't understand the question.

Do you mean you want to wrap this function in an ESB.NET service?

If so, create a standard ESB.NET service (call it say, HelloService) and have it call your Hello function.

In the definition of the HelloService, ensure the request payload xsd has a UserName field defined.

Feb 12, 2011 at 3:51 AM
minas,Happy Spring Festival.
I just got back from the Spring Festival.
thanks for your reply.
but i don't know how can i coding Hello Function in HelloService?
the hello.xsd file definition:
<?xml version="1.0" encoding="UTF-8"?>
<!--W3C Schema generated by XMLSpy v2007 sp2 (http://www.altova.com)-->
<xs:schema xmlns:bcmd="urn:keystroke.com.au.esb.Hello.version_1_0_0_0" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:keystroke.com.au.esb.Hello.version_1_0_0_0" elementFormDefault="qualified" attributeFormDefault="unqualified">
 <xs:element name="Hello">
  <xs:complexType>
   <xs:sequence>
    <xs:element name="UserName" type="xs:string"/>
   </xs:sequence>
  </xs:complexType>
 </xs:element>
</xs:schema>
<!--l version="1.0" encoding="UTF-8-->
<!--W3C Schema generated by XMLSpy v2007 sp2 (http://www.altova.com)-->

 
  
   
    
   
  
 
Feb 14, 2011 at 12:28 PM
Edited Feb 14, 2011 at 12:28 PM

Hi zxpsky ,

To get ESB.NET to expose the Hello service, do the following:

  • Create a new ESB.NET service.
  • Change the BSDL file's (C:\ESB\Dev\Source\ESB\LobSystems\lcs\Ctx\ESB.NET.Services.Basic1\ConfigRequest section to:
    • point to the path of your Hello.xsd file (Url)
    • namespace (Namespace) and
    • root element (Name) as shown below:
 <ServiceDefinition>
    <Service>
      <DistinguishedServiceName>
        <ServiceName>Service11.1.0.0</ServiceName>
        <ServiceNamespace>ESB.NET.Services.Basic1</ServiceNamespace>
      </DistinguishedServiceName>
      <Request>
        <Document>
          <Schema>
            <Name>Hello</Name>
            <Namespace>urn:keystroke.com.au.esb.Hello.version_1_0_0_0</Namespace>
            <Url>LobSystems\XMLSchemas\BuildCmd\1.0.0.0\BuildCmd.xsd</Url>
          </Schema>...

 

 

To implement the Hello service, do the following:

  • Add your Hello.xsd file to your Visual Studio project.
  • Use the XSD2Code add-in utility from within Visual Studio.NET 2010 to create the xml serialization classes for Hello.xsd.
  • Use the generated classes to manipulate the request document - modify code provided by ESB.NET service template for Visual Studio.

Cheers Minas