You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Wang, Yong (MAN-Corporate)" <Yo...@manheim.com> on 2007/03/13 21:50:54 UTC

HELP: wsdl2java generates unusable client code

Could some kind soul please help? I am running out of ideas why this is
happening. I have these 2 WSDLs: OrchestrationLTService.wsdl and
OrchestrationServices.wsdl (included in OrchestrationLTService.wsdl but
not used). They are attached in this email. I am running axis 1.4. I use
org.apache.axis.wsdl.WSDL2Java to generate the client stubs but the
following client call would error out:

 

            OrchestrationLTServiceLocator loc = new
OrchestrationLTServiceLocator();

            OrchestrationPT port = loc.getOrchestrationLTServicePort(new
URL("http://localhost:8080/orch/services/OrchestrationLTService"));

            Calendar c = Calendar.getInstance();

            port.request(c, 5135098009L, "unit test");

 

with exception:

 

javax.xml.rpc.JAXRPCException: No operation name specified!

            at org.apache.axis.client.Call.invokeOneWay(Call.java:1848)

            at
com.manheim.point.orch.ws.bpel.client.OrchestrationLTServiceBindingStub.
request(OrchestrationLTServiceBindingStub.java:284)

            at
com.manheim.point.orch.ws.WSClientTest.testOrchestrationInitiation(WSCli
entTest.java:32)

            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

            at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)

            at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)

            at java.lang.reflect.Method.invoke(Method.java:585)

            at junit.framework.TestCase.runTest(TestCase.java:154)

            at junit.framework.TestCase.runBare(TestCase.java:127)

            at junit.framework.TestResult$1.protect(TestResult.java:106)

            at
junit.framework.TestResult.runProtected(TestResult.java:124)

            at junit.framework.TestResult.run(TestResult.java:109)

            at junit.framework.TestCase.run(TestCase.java:118)

            at junit.framework.TestSuite.runTest(TestSuite.java:208)

            at junit.framework.TestSuite.run(TestSuite.java:203)

            at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe
stRunner.java:474)

            at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRun
ner.java:342)

            at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRu
nner.java:194)

 

Please help. Thanks.

 


Re: wsdl2java generates unusable client code

Posted by Anne Thomas Manes <at...@gmail.com>.
Your WSDL is not valid. You're mixing document and RPC formats. I also
recommend removing the import and any namespace declarations that you
aren't using.

When using document style, your message may contain at most one body
message part (you have three), and the message part must reference an
element definition (you're referencing types). You have two options:
Add a types section and define an element that contains your three
parameters, e.g.,
   <xsd:element name="startProcess">
       <xsd:complexType>
           <xsd:sequence>
              <xsd:element name="createTime" type="xsd:dateTime" />
              <xsd:element name="dealerId" type="xsd:long" />
              <xsd:element name="lastCaller" type="xsd:string" />
            </xsd:sequence>
       </xsd:complexType>
   </xsd:element>

and then reference this element from the message part:

  <message name="RequestMessage">
    <part name="parameters" element="tns:startProcess />
  </message>

Or, change the binding style to "rpc" and add a namespace attribute to
the <soap:binding>:

  <binding name="OrchestrationLTServiceBinding" type="tns:OrchestrationPT">
    <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"  />
    <operation name="startProcess">
      <soap:operation soapAction="" style="rpc"  />
    <input>
       <soap:body use="literal"
namespace="http://ws.orch.point.manheim.com/dataconsume/WSDL/Orchestration.wsdl"
 />
  </input>
  </operation>
  </binding>

On 3/14/07, Wang, Yong (MAN-Corporate) <Yo...@manheim.com> wrote:
>
>
>
>
> Hi Martin, thank you for your response. I changed the operation name to
> "startProcess" but still getting the same error. Pls see updated wsdl. Could
> you please let me know what else I can try? Thanks!
>
>
>
>  ________________________________
>
>
> From: Martin Gainty [mailto:mgainty@hotmail.com]
>  Sent: Tuesday, March 13, 2007 5:52 PM
>  To: axis-user@ws.apache.org
>  Subject: Re: wsdl2java generates unusable client code
>
>
>
>
>
> when operation name = "request" this confuses Axis as the AxisServlet
> specifically reserves
>
>
> *response* for response to client
>  anything with request as Input to the service
>
>
>
>  change your operation name to anything other than request or response
>
>
>
>  M-
>
>
> ---------------------------------------------------------------------------
>  This e-mail message (including attachments, if any) is intended for the use
> of the individual or entity to which it is addressed and may contain
> information that is privileged, proprietary , confidential and exempt from
> disclosure. If you are not the intended recipient, you are notified that any
> dissemination, distribution or copying of this communication is strictly
> prohibited.
> ---------------------------------------------------------------------------
>  Le présent message électronique (y compris les pièces qui y sont annexées,
> le cas échéant) s'adresse au destinataire indiqué et peut contenir des
> renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le
> destinataire de ce document, nous vous signalons qu'il est strictement
> interdit de le diffuser, de le distribuer ou de le reproduire.
>
>
>
> ----- Original Message -----
>
>
> From: Wang, Yong (MAN-Corporate)
>
>
> To: axis-user@ws.apache.org
>
>
> Sent: Tuesday, March 13, 2007 4:50 PM
>
>
> Subject: HELP: wsdl2java generates unusable client code
>
>
>
>
> Could some kind soul please help? I am running out of ideas why this is
> happening. I have these 2 WSDLs: OrchestrationLTService.wsdl and
> OrchestrationServices.wsdl (included in OrchestrationLTService.wsdl but not
> used). They are attached in this email. I am running axis 1.4. I use
> org.apache.axis.wsdl.WSDL2Java to generate the client stubs but the
> following client call would error out:
>
>
>
>             OrchestrationLTServiceLocator loc = new
> OrchestrationLTServiceLocator();
>
>             OrchestrationPT port =
> loc.getOrchestrationLTServicePort(new
> URL("http://localhost:8080/orch/services/OrchestrationLTService"));
>
>             Calendar c = Calendar.getInstance();
>
>             port.request(c, 5135098009L, "unit test");
>
>
>
> with exception:
>
>
>
> javax.xml.rpc.JAXRPCException: No operation name specified!
>
>             at
> org.apache.axis.client.Call.invokeOneWay(Call.java:1848)
>
>             at
> com.manheim.point.orch.ws.bpel.client.OrchestrationLTServiceBindingStub.request(OrchestrationLTServiceBindingStub.java:284)
>
>             at
> com.manheim.point.orch.ws.WSClientTest.testOrchestrationInitiation(WSClientTest.java:32)
>
>             at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>             at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
>             at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
>             at java.lang.reflect.Method.invoke(Method.java:585)
>
>             at
> junit.framework.TestCase.runTest(TestCase.java:154)
>
>             at
> junit.framework.TestCase.runBare(TestCase.java:127)
>
>             at
> junit.framework.TestResult$1.protect(TestResult.java:106)
>
>             at
> junit.framework.TestResult.runProtected(TestResult.java:124)
>
>             at junit.framework.TestResult.run(TestResult.java:109)
>
>             at junit.framework.TestCase.run(TestCase.java:118)
>
>             at
> junit.framework.TestSuite.runTest(TestSuite.java:208)
>
>             at junit.framework.TestSuite.run(TestSuite.java:203)
>
>             at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:474)
>
>             at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:342)
>
>             at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:194)
>
>
>
> Please help. Thanks.
>
>
>  ________________________________
>
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
>  For additional commands, e-mail: axis-user-help@ws.apache.org
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: wsdl2java generates unusable client code

Posted by "Wang, Yong (MAN-Corporate)" <Yo...@manheim.com>.
Hi Martin, thank you for your response. I changed the operation name to "startProcess" but still getting the same error. Pls see updated wsdl. Could you please let me know what else I can try? Thanks!

 

________________________________

From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: Tuesday, March 13, 2007 5:52 PM
To: axis-user@ws.apache.org
Subject: Re: wsdl2java generates unusable client code

 

when operation name = "request" this confuses Axis as the AxisServlet specifically reserves 

*response* for response to client
anything with request as Input to the service


change your operation name to anything other than request or response


M-

--------------------------------------------------------------------------- 
This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited.
--------------------------------------------------------------------------- 
Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire.

	----- Original Message ----- 

	From: Wang, Yong (MAN-Corporate) <ma...@manheim.com>  

	To: axis-user@ws.apache.org 

	Sent: Tuesday, March 13, 2007 4:50 PM

	Subject: HELP: wsdl2java generates unusable client code

	 

	Could some kind soul please help? I am running out of ideas why this is happening. I have these 2 WSDLs: OrchestrationLTService.wsdl and OrchestrationServices.wsdl (included in OrchestrationLTService.wsdl but not used). They are attached in this email. I am running axis 1.4. I use org.apache.axis.wsdl.WSDL2Java to generate the client stubs but the following client call would error out:

	 

	            OrchestrationLTServiceLocator loc = new OrchestrationLTServiceLocator();

	            OrchestrationPT port = loc.getOrchestrationLTServicePort(new URL("http://localhost:8080/orch/services/OrchestrationLTService"));

	            Calendar c = Calendar.getInstance();

	            port.request(c, 5135098009L, "unit test");

	 

	with exception:

	 

	javax.xml.rpc.JAXRPCException: No operation name specified!

	            at org.apache.axis.client.Call.invokeOneWay(Call.java:1848)

	            at com.manheim.point.orch.ws.bpel.client.OrchestrationLTServiceBindingStub.request(OrchestrationLTServiceBindingStub.java:284)

	            at com.manheim.point.orch.ws.WSClientTest.testOrchestrationInitiation(WSClientTest.java:32)

	            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

	            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

	            at java.lang.reflect.Method.invoke(Method.java:585)

	            at junit.framework.TestCase.runTest(TestCase.java:154)

	            at junit.framework.TestCase.runBare(TestCase.java:127)

	            at junit.framework.TestResult$1.protect(TestResult.java:106)

	            at junit.framework.TestResult.runProtected(TestResult.java:124)

	            at junit.framework.TestResult.run(TestResult.java:109)

	            at junit.framework.TestCase.run(TestCase.java:118)

	            at junit.framework.TestSuite.runTest(TestSuite.java:208)

	            at junit.framework.TestSuite.run(TestSuite.java:203)

	            at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:474)

	            at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:342)

	            at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:194)

	 

	Please help. Thanks.

	 

	
________________________________


	---------------------------------------------------------------------
	To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
	For additional commands, e-mail: axis-user-help@ws.apache.org


Re: wsdl2java generates unusable client code

Posted by Martin Gainty <mg...@hotmail.com>.
when operation name = "request" this confuses Axis as the AxisServlet specifically reserves 
*response* for response to client
anything with request as Input to the service

change your operation name to anything other than request or response

M-
--------------------------------------------------------------------------- 
This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited.
--------------------------------------------------------------------------- 
Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire.
  ----- Original Message ----- 
  From: Wang, Yong (MAN-Corporate) 
  To: axis-user@ws.apache.org 
  Sent: Tuesday, March 13, 2007 4:50 PM
  Subject: HELP: wsdl2java generates unusable client code


  Could some kind soul please help? I am running out of ideas why this is happening. I have these 2 WSDLs: OrchestrationLTService.wsdl and OrchestrationServices.wsdl (included in OrchestrationLTService.wsdl but not used). They are attached in this email. I am running axis 1.4. I use org.apache.axis.wsdl.WSDL2Java to generate the client stubs but the following client call would error out:

   

              OrchestrationLTServiceLocator loc = new OrchestrationLTServiceLocator();

              OrchestrationPT port = loc.getOrchestrationLTServicePort(new URL("http://localhost:8080/orch/services/OrchestrationLTService"));

              Calendar c = Calendar.getInstance();

              port.request(c, 5135098009L, "unit test");

   

  with exception:

   

  javax.xml.rpc.JAXRPCException: No operation name specified!

              at org.apache.axis.client.Call.invokeOneWay(Call.java:1848)

              at com.manheim.point.orch.ws.bpel.client.OrchestrationLTServiceBindingStub.request(OrchestrationLTServiceBindingStub.java:284)

              at com.manheim.point.orch.ws.WSClientTest.testOrchestrationInitiation(WSClientTest.java:32)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:585)

              at junit.framework.TestCase.runTest(TestCase.java:154)

              at junit.framework.TestCase.runBare(TestCase.java:127)

              at junit.framework.TestResult$1.protect(TestResult.java:106)

              at junit.framework.TestResult.runProtected(TestResult.java:124)

              at junit.framework.TestResult.run(TestResult.java:109)

              at junit.framework.TestCase.run(TestCase.java:118)

              at junit.framework.TestSuite.runTest(TestSuite.java:208)

              at junit.framework.TestSuite.run(TestSuite.java:203)

              at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:474)

              at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:342)

              at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:194)

   

  Please help. Thanks.

   



------------------------------------------------------------------------------


  ---------------------------------------------------------------------
  To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
  For additional commands, e-mail: axis-user-help@ws.apache.org