Web Services- Couple of Questions

Posted by nweddle on 20-Oct-2008 17:16

I will be hosting some Web Services in the ESB and I have a few questions:

I am running version 7.01

1. Where do I store the WSDL and XSD files in Sonic where a client program can access them? What would the full URL be?

2. What is the URL of a web service that is deplyed to non-Workbench environment? http:// ??

3. I successfully created an UNWRAP ESBWS type from a WSDL I created by hand. When I tried to create a RESPONSE ESBWS Type, I got an error saying "Invalid ESBWS type for the selected operation".(See attached file) My WSDL is valid XML. Does the ESB support WSDL files that import schemas instead of declaring the complex types in the WSDL itself?

InvalidESBWSType.zip

All Replies

Posted by Bill Wood on 06-Feb-2010 11:27

Your problems seem to revolve around the WSDL that clients use.

When you attach a ESB Process to a WSDL, and then expose that ESBP at a URL, (done in the WS-Protocol setting), then Sonic can serve up the WSDL.   (For example, if the process XYX.esbp maps to url /abc on an acceptor 2580, then the url for the WSDL would be:  "http://:2580/abc?wsdl.

Sonic Workbench 'automatically' sets up processes and an acceptor for them.  So in Workbench, you would have seen it as "http://localhost:2580/processes/XYX?wsdl

When you move to another machine, you need to make sure the WS-Protocol and Acceptors are set up, but once you do, then the ?wsdl will reflect that.

One related thing is about schema.  If your schema is at an HTTP url (or if you expose it via http in sonic), then the WSDL can import the XSD at an absolute http URL.    If you don't want to deploy the XSD separately, you need to inline it.  In particular, if the WSDL imports the schema at a SONICFS url, then this won't work for external clients who don't have access to the sonicfs scheme.

So, in summary for your questions....

1. Where do I store the WSDL and XSD files in Sonic where a client program can access them? What would the full URL be?

2. What is the URL of a web service that is deplyed to non-Workbench environment? http:// ??

3. I successfully created an UNWRAP ESBWS type from a WSDL I created by hand. When I tried to create a RESPONSE ESBWS Type, I got an error saying "Invalid ESBWS type for the selected operation".(See attached file) My WSDL is valid XML. Does the ESB support WSDL files that import schemas instead of declaring the complex types in the WSDL itself?

Ans #1.  It would depend on the WS-Protocol and Acceptor for the base url.  The WSDL would use ?wsdl, and the .xsds would need to at another http url.

Ans #2.  You need to set up your WS-Protocal and Acceptor to point to the WSDL

Ans #3. Yes, the esb would support included/imported schemas.  that is common.  The problem seemed to be in the ESBWS type (Response) for an operation that may not have had this.  You can ask the Workbench to verify/validate the WSDL.  That should trll you more information

This thread is closed