Charith, thank you for your help. Here is how my stub classes where generated, hope this is what you need:
> wsimport -extension -keep -s source -d generated -p uk.co.package.name.stubs http://INTERNAL_IP_AND_PORT_HIDDEN/services/ValidateCLI_Service?wsdl I have also attached the original WSDL at the above URL. Hope you can help. Many thanks! Henrik 2008/12/11 Charith Wickramarachchi <[EMAIL PROTECTED]> > Hi, > > Can you tell me what is the WSDL location in your TelewestBindingService > class that was generated using wsimport? > (you can use wsimport -keep ) > > On Thu, Dec 11, 2008 at 7:35 AM, Henrik Pettersen < > [EMAIL PROTECTED]> wrote: > > > All, > > > > I am attempting to proxy some of our webservices, but have run into a > small > > problem. > > > > 1. Our codebase has a set of generated stubs, created by wsimport with > our > > webservice wsdl files > > > > 2. We need to be able to reuse these same stubs to point to both our > > original webservice, as well as our synapse webservice proxy > > > > 3. However, when we try to use Synapse as a proxy, we get this error from > > the stubs classes: > > > > Port {http://ican.web.services}TelewestBindingPort is not found in > > service ... > > {http://ican.web.services}ValidateCLI_Service in the wsdl > > http://localhost:8280/services/ValidateCLI?wsdl > > > > where *TelewestBindingPort* is the name of the binding name in our > > original wsdl: > > > > <...snip> > > <binding name="TelewestBinding" type="jcapsws:TelewestPortType"> > > <soap:binding style="document" transport=" > > http://schemas.xmlsoap.org/soap/http"/> > > <operation name="ValidateCLI"> > > </snip...> > > > > 4. Looking at the proxied wsdl returned by Synapse, we see that the > > original binding name *TelewestBindingPort* is gone: > > > > <...snip> > > <wsdl:binding name="ValidateCLIHttpBinding" > > type="jcapsws:ValidateCLIPortType"> > > <http:binding verb="POST"/> > > </snip...> > > > > > > Looking around, it seemed like using the service parameter > > 'useOriginalWsdl' and 'modifyUserWSDLPortAddress' would be the way > forward. > > However, I believe I have been unable to get this feature to work, as the > > wsdl served up by Synapse is completely identical no matter what value > > (true/false) these parameters are set to. Perhaps I am misunderstanding > how > > this feature works, or perhaps I am going wrong in my synapse.xml. Not > sure. > > > > > > Here is my current setup: > > -- Microsoft Windows XP Pro SP3 > > -- Java 1.6 > > -- A development snapshot of Synapse from 1-2 days ago > > > > I realise that a development snapshot is in no way stable, but there have > > been some crucial bugfixes to your codebase since the 1.2 release. > > > > A complete, standalone test case can be downloaded from here: > > http://sparklingideas.co.uk/synapse.test.case.henrik.zip* [28 MB]* > > > > For convenience, I have also attached to this email: > > > > 1. *validateCli.wsdl* [Original WSDL file] > > 2. *proxied_validateCli.wsdl *[Proxied WSDL file, served up by > Synapse] > > 3. *synapse.xml* > > 4. *stack.trace* [stacktrace from the wsimport stubs, when > > "TelewestBindingPort" can not be found] > > 5. *generated.java.source.sample.java* [File generated by wsimport. > > Note the hardcoded binding name "TelewestBindingPort"] > > > > which can also be found in the zip file. Here is my proxy config: > > > > <proxy name="ValidateCLI" transports="http" trace="enable"> > > <publishWSDL key="validateCli.wsdl" trace="enable"> > > <parameter name="useOriginalwsdl">true</parameter> > > <parameter name="modifyUserWSDLPortAddress">true</parameter> > > > > <resource location="ValidateCLIRequest_V1.0.xsd" > > key="ValidateCLIRequest"/> > > <resource location="ValidateCLIResponse_V1.0.xsd" > > key="ValidateCLIResponse"/> > > <resource location="commontypes.xsd" > > key="CommonTypes"/> > > </publishWSDL> > > <target> > > <inSequence></inSequence> > > <outSequence></outSequence> > > </target> > > </proxy> > > > > Unfortunately, I am unable to change our original wsdl file, nor can I > > re-run the wsimport routine against the proxied webservice wsdl, to fix > the > > binding name problem. Pity. > > > > If anyone has had any experience with these sort of issues around binding > > names, I would be very grateful if you could share some of your > experiences. > > Perhaps I am doing something wrong in my configuration, or perhaps what I > am > > attempting to do is simply not possible (!) > > > > Any help would be greatly appreciated. > > > > Many thanks! > > > > Sincerely, > > Henrik Pettersen > > Sparkling Ideas, ltd. > > > > > > -- > Charith Dhanushka Wickramarachchi > http://charithwiki.blogspot.com/ >
<?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:jcapsws="http://ican.web.services" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://ican.web.services" > <types> <xs:schema xmlns:req="urn:telewest.types.message.request" xmlns:rsp="urn:telewest.types.message.response" id="UID-xxxxxxx-xxxxxxxxxxxx-xxxxxx-xx" targetNamespace="http://ican.web.services" > <xs:import namespace="urn:telewest.types.message.response" schemaLocation="ValidateCLIResponse_V1.0.xsd"/> <xs:import namespace="urn:telewest.types.message.request" schemaLocation="ValidateCLIRequest_V1.0.xsd"/> <xs:element name="InputMsg" type="req:ValidateCLIRequestCplxType"/> <xs:element name="OutputMsg" type="rsp:ValidateCLIResponseCplxType"/> <xs:element name="FaultMsg" type="xs:string"/> </xs:schema> </types> <message name="ValidateCLIFault"> <part name="bodyUPF" element="jcapsws:FaultMsg"/> </message> <message name="ValidateCLIOutput"> <part name="bodyUPO" element="jcapsws:OutputMsg"/> </message> <message name="ValidateCLIInput"> <part name="bodyUPI" element="jcapsws:InputMsg"/> </message> <portType name="TelewestPortType"> <operation name="ValidateCLI"> <input name="inputMsgUP" message="jcapsws:ValidateCLIInput"/> <output name="outputMsgUP" message="jcapsws:ValidateCLIOutput"/> <fault name="errorMsgUP" message="jcapsws:ValidateCLIFault"/> </operation> </portType> <binding name="TelewestBinding" type="jcapsws:TelewestPortType"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="ValidateCLI"> <soap:operation soapAction="urn:ValidateCLI"/> <input> <soap:body parts="bodyUPI" use="literal"/> </input> <output> <soap:body parts="bodyUPO" use="literal"/> </output> <fault name="errorMsgUP"> <soap:fault name="errorMsgUP" use="literal"/> </fault> </operation> </binding> <service name="ValidateCLI_Service"> <port name="TelewestBindingPort" binding="jcapsws:TelewestBinding"> <soap:address location="http://SERVER_NAME_AND_PORT_HIDDEN/ValidateCLI/TelewestBindingPort" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/> </port> </service> </definitions>
