• Post Reply Bookmark Topic Watch Topic
  • New Topic

[ERROR] More than one part for message AddRequest

 
Remi Desreumaux
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, when I call :






Using AXIS2_HOME: C:\axis2-1.5.1-bin\axis2-1.5.1
Using JAVA_HOME: C:\j\
Retrieving document at 'http://intevit.com/ws/EX3/WebService.wsdl'.
[ERROR] More than one part for message AddRequest
org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException:
More than one part for message AddRequest


How can I fix this?
I heard about litteral/encoded soap body but I cannot fix it.
http://www.w3.org/TR/wsdl#_soap:body

here is my math.php

thank you
 
shivendra tripathi
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is because the WSDL you are using is incorrect. WSDL is having style as "Document" with multiple parts. Multiple parts are possible only for RPC style. To fix it change style attribute of your WSDL as RPC in place of Document.
 
Remi Desreumaux
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I don't see the attribute Document in my wsdl
http://intevit.com/ws/EX3/WebService.wsdl

(( thank you for help.
 
shivendra tripathi
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If style attribute is not specified "Document" style is considered by default, as mentioned in WSDL spec for soap: operation element

The style attribute indicates whether the operation is RPC-oriented (messages containing parameters and return values) or document-oriented (message containing document(s)). This information may be used to select an appropriate programming model. The value of this attribute also affects the way in which the Body of the SOAP message is constructed, as explained in Section 3.5 below. If the attribute is not specified, it defaults to the value specified in the soap:binding element. If the soap:binding element does not specify a style, it is assumed to be "document".
 
shivendra tripathi
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Remi,

Did you try modifying your WSDL as suggested?
 
Remi Desreumaux
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you so much, this is better!!
 
Remi Desreumaux
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but at the execution time :


I have this awful error :

org.apache.axis2.AxisFault: First Element must contain the local name, Envelope , but found definitions
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:118)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:67)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:354)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at org.apache.axis2.axis2userguide.Service1Stub.add(Service1Stub.java:312)
at namespace.webservice._new.Client.main(Client.java:24)
Caused by: org.apache.axiom.soap.SOAPProcessingException: First Element must contain the local name, Envelope , but found definitions
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:267)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:224)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createNextOMElement(StAXSOAPModelBuilder.java:196)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:207)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:161)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:110)
at org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:682)
at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:210)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:140)
at org.apache.axis2.transport.TransportUtils.
 
Remi Desreumaux
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I regenerated the stubs from web service client eclipse plug-in:


log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle). log4j:WARN Please initialize the log4j system properly. 3

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!