You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by vashistvishal <va...@gmail.com> on 2007/09/03 09:37:27 UTC

Additional element in Request Packet (SOAP payload ) is generated with name arg0

I'm consuming a service using CXF client which uses this wsdl mentioned
below.

When the outgoing message is sent it adds _arg0_ in soap packet, which is
one 
element extra, client is not expecting this.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body><ns2:HelloWorld
xmlns:ns2="http://www.superpartners.com.au/matt.HelloWorld3">
<arg0>
<id>HELLO VISHAL</id>
</arg0>
</ns2:HelloWorld>
</soap:Body>
</soap:Envelope>
--------------------------------------
 
My cleint is expecting this...packet.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body><ns2:HelloWorld
xmlns:ns2="http://www.superpartners.com.au/matt.HelloWorld3">

<id>HELLO VISHAL</id>

</ns2:HelloWorld>
</soap:Body>
</soap:Envelope>

-----
This issue seems to be with java or CXF implementation. Any help will be
good 
or pointers to remove this additional elemnt which seems to be coming in no
mmater what 
i do with WSDL.
 Is this soemthing to do with Java lang specific or i'm making some dumb
mistake.

Part of WSDL is shopwn below

<xsd:element name="HelloWorld" type="tns:HelloWorld"/>
   <xsd:element name="HelloWorldResponse" type="tns:HelloWorldResponse"/>
    	
    <xsd:complexType name='HelloWorld'>
    <xsd:sequence>
     <xsd:element minOccurs='0' name='arg0' type="tns:HelloWorldReq"/>
    </xsd:sequence>
   </xsd:complexType>
  
   <xsd:complexType name='HelloWorldReq'>
    <xsd:sequence>
     <xsd:element minOccurs='0' name='id' type='xsd:string'/>
     </xsd:sequence>
   </xsd:complexType>
  
   <xsd:complexType name='HelloWorldResponse'>
    <xsd:sequence>
     <xsd:element minOccurs='0' name='return' type='tns:HelloWorldResp'/>
    </xsd:sequence>
   </xsd:complexType>
  
   <xsd:complexType name='HelloWorldResp'>
    <xsd:sequence>
     <xsd:element minOccurs='0' name='result' type='xsd:string'/>
    </xsd:sequence>
   </xsd:complexType>       
   </xsd:schema>
    
	</wsdl:types>
	
	<wsdl:message name="HelloWorldIn">
		<wsdl:part name="HelloWorld" element="tns:HelloWorld"/>
	</wsdl:message>
	
	<wsdl:message name="HelloWorldOutput">
		<wsdl:part name="HelloWorldResponse" element="tns:HelloWorldResponse"/>
	</wsdl:message>
-- 
View this message in context: http://www.nabble.com/Additional-element-in-Request-Packet-%28SOAP-payload-%29-is-generated-with-name-arg0-tf4370745.html#a12457602
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Additional element in Request Packet (SOAP payload ) is generated with name arg0

Posted by Glen Mazza <gl...@verizon.net>.
We need to do more detective work.  I would create your client against
GlassFish Metro using your WSDL to see if the problem still occurs; if
it does, we know it's a WSDL problem, if it doesn't then it's a CXF
problem.

The two products are very similar (and if you're going to do any amount
of web service client work, you're going to need both eventually anyway
for troubleshooting)--I recently created an Ant script that will work
for both CXF and Metro that might be helpful for you.[1]

Regards,
Glen

[1] http://www.jroller.com/gmazza/date/20070821


Am Montag, den 03.09.2007, 16:35 -0700 schrieb vashistvishal:
> Thanks Glen,
> 
> This is what the binding looks like. It is doc/lit wrapped.
> It will be good if you can give me some pointers why it is adding _arg0_ in
> packet.
> 
> --------------------------------------------------
> <wsdl:portType name="matt_HelloWorld3PortType">
> 		<wsdl:operation name="HelloWorld">
> 			<wsdl:input message="tns:HelloWorldIn"/>
> 			<wsdl:output message="tns:HelloWorldOutput"/>
> 		</wsdl:operation>
> </wsdl:portType>
> 
> <wsdl:binding name="matt_HelloWorld3Binding"
> type="tns:matt_HelloWorld3PortType">
> 	<soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> 	<wsdl:operation name="HelloWorld">
> 		<soap:operation soapAction=""/>
> 		<wsdl:input>
> 			<soap:body use="literal"/>
> 		</wsdl:input>
> 		<wsdl:output>
> 			<soap:body use="literal"/>
> 		</wsdl:output>
>       </wsdl:operation>
> </wsdl:binding>
> ----------------------------------------------------
> 
> 
> Glen Mazza-2 wrote:
> > 
> > This seems to be a simple web service, so I am not sure of the problem
> > Can we see the <wsdl:binding/> and <wsdl:portType/> section for this
> > operation--that might be helpful in determining the types of message
> > being sent--doc/lit, doc/lit wrapped, rpc/literal?
> > 
> > Thanks,
> > Glen
> > 
> > Am Montag, den 03.09.2007, 00:37 -0700 schrieb vashistvishal:
> >> I'm consuming a service using CXF client which uses this wsdl mentioned
> >> below.
> >> 
> >> When the outgoing message is sent it adds _arg0_ in soap packet, which is
> >> one 
> >> element extra, client is not expecting this.
> >> 
> >> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> >> <soap:Body><ns2:HelloWorld
> >> xmlns:ns2="http://www.superpartners.com.au/matt.HelloWorld3">
> >> <arg0>
> >> <id>HELLO VISHAL</id>
> >> </arg0>
> >> </ns2:HelloWorld>
> >> </soap:Body>
> >> </soap:Envelope>
> >> --------------------------------------
> >>  
> >> My cleint is expecting this...packet.
> >> 
> >> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> >> <soap:Body><ns2:HelloWorld
> >> xmlns:ns2="http://www.superpartners.com.au/matt.HelloWorld3">
> >> 
> >> <id>HELLO VISHAL</id>
> >> 
> >> </ns2:HelloWorld>
> >> </soap:Body>
> >> </soap:Envelope>
> >> 
> >> -----
> >> This issue seems to be with java or CXF implementation. Any help will be
> >> good 
> >> or pointers to remove this additional elemnt which seems to be coming in
> >> no
> >> mmater what 
> >> i do with WSDL.
> >>  Is this soemthing to do with Java lang specific or i'm making some dumb
> >> mistake.
> >> 
> >> Part of WSDL is shopwn below
> >> 
> >> <xsd:element name="HelloWorld" type="tns:HelloWorld"/>
> >>    <xsd:element name="HelloWorldResponse" type="tns:HelloWorldResponse"/>
> >>     	
> >>     <xsd:complexType name='HelloWorld'>
> >>     <xsd:sequence>
> >>      <xsd:element minOccurs='0' name='arg0' type="tns:HelloWorldReq"/>
> >>     </xsd:sequence>
> >>    </xsd:complexType>
> >>   
> >>    <xsd:complexType name='HelloWorldReq'>
> >>     <xsd:sequence>
> >>      <xsd:element minOccurs='0' name='id' type='xsd:string'/>
> >>      </xsd:sequence>
> >>    </xsd:complexType>
> >>   
> >>    <xsd:complexType name='HelloWorldResponse'>
> >>     <xsd:sequence>
> >>      <xsd:element minOccurs='0' name='return' type='tns:HelloWorldResp'/>
> >>     </xsd:sequence>
> >>    </xsd:complexType>
> >>   
> >>    <xsd:complexType name='HelloWorldResp'>
> >>     <xsd:sequence>
> >>      <xsd:element minOccurs='0' name='result' type='xsd:string'/>
> >>     </xsd:sequence>
> >>    </xsd:complexType>       
> >>    </xsd:schema>
> >>     
> >> 	</wsdl:types>
> >> 	
> >> 	<wsdl:message name="HelloWorldIn">
> >> 		<wsdl:part name="HelloWorld" element="tns:HelloWorld"/>
> >> 	</wsdl:message>
> >> 	
> >> 	<wsdl:message name="HelloWorldOutput">
> >> 		<wsdl:part name="HelloWorldResponse" element="tns:HelloWorldResponse"/>
> >> 	</wsdl:message>
> > 
> > 
> > 
> 


Re: Additional element in Request Packet (SOAP payload ) is generated with name arg0

Posted by vashistvishal <va...@gmail.com>.
Thanks Glen,

This is what the binding looks like. It is doc/lit wrapped.
It will be good if you can give me some pointers why it is adding _arg0_ in
packet.

--------------------------------------------------
<wsdl:portType name="matt_HelloWorld3PortType">
		<wsdl:operation name="HelloWorld">
			<wsdl:input message="tns:HelloWorldIn"/>
			<wsdl:output message="tns:HelloWorldOutput"/>
		</wsdl:operation>
</wsdl:portType>

<wsdl:binding name="matt_HelloWorld3Binding"
type="tns:matt_HelloWorld3PortType">
	<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
	<wsdl:operation name="HelloWorld">
		<soap:operation soapAction=""/>
		<wsdl:input>
			<soap:body use="literal"/>
		</wsdl:input>
		<wsdl:output>
			<soap:body use="literal"/>
		</wsdl:output>
      </wsdl:operation>
</wsdl:binding>
----------------------------------------------------


Glen Mazza-2 wrote:
> 
> This seems to be a simple web service, so I am not sure of the problem
> Can we see the <wsdl:binding/> and <wsdl:portType/> section for this
> operation--that might be helpful in determining the types of message
> being sent--doc/lit, doc/lit wrapped, rpc/literal?
> 
> Thanks,
> Glen
> 
> Am Montag, den 03.09.2007, 00:37 -0700 schrieb vashistvishal:
>> I'm consuming a service using CXF client which uses this wsdl mentioned
>> below.
>> 
>> When the outgoing message is sent it adds _arg0_ in soap packet, which is
>> one 
>> element extra, client is not expecting this.
>> 
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>> <soap:Body><ns2:HelloWorld
>> xmlns:ns2="http://www.superpartners.com.au/matt.HelloWorld3">
>> <arg0>
>> <id>HELLO VISHAL</id>
>> </arg0>
>> </ns2:HelloWorld>
>> </soap:Body>
>> </soap:Envelope>
>> --------------------------------------
>>  
>> My cleint is expecting this...packet.
>> 
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>> <soap:Body><ns2:HelloWorld
>> xmlns:ns2="http://www.superpartners.com.au/matt.HelloWorld3">
>> 
>> <id>HELLO VISHAL</id>
>> 
>> </ns2:HelloWorld>
>> </soap:Body>
>> </soap:Envelope>
>> 
>> -----
>> This issue seems to be with java or CXF implementation. Any help will be
>> good 
>> or pointers to remove this additional elemnt which seems to be coming in
>> no
>> mmater what 
>> i do with WSDL.
>>  Is this soemthing to do with Java lang specific or i'm making some dumb
>> mistake.
>> 
>> Part of WSDL is shopwn below
>> 
>> <xsd:element name="HelloWorld" type="tns:HelloWorld"/>
>>    <xsd:element name="HelloWorldResponse" type="tns:HelloWorldResponse"/>
>>     	
>>     <xsd:complexType name='HelloWorld'>
>>     <xsd:sequence>
>>      <xsd:element minOccurs='0' name='arg0' type="tns:HelloWorldReq"/>
>>     </xsd:sequence>
>>    </xsd:complexType>
>>   
>>    <xsd:complexType name='HelloWorldReq'>
>>     <xsd:sequence>
>>      <xsd:element minOccurs='0' name='id' type='xsd:string'/>
>>      </xsd:sequence>
>>    </xsd:complexType>
>>   
>>    <xsd:complexType name='HelloWorldResponse'>
>>     <xsd:sequence>
>>      <xsd:element minOccurs='0' name='return' type='tns:HelloWorldResp'/>
>>     </xsd:sequence>
>>    </xsd:complexType>
>>   
>>    <xsd:complexType name='HelloWorldResp'>
>>     <xsd:sequence>
>>      <xsd:element minOccurs='0' name='result' type='xsd:string'/>
>>     </xsd:sequence>
>>    </xsd:complexType>       
>>    </xsd:schema>
>>     
>> 	</wsdl:types>
>> 	
>> 	<wsdl:message name="HelloWorldIn">
>> 		<wsdl:part name="HelloWorld" element="tns:HelloWorld"/>
>> 	</wsdl:message>
>> 	
>> 	<wsdl:message name="HelloWorldOutput">
>> 		<wsdl:part name="HelloWorldResponse" element="tns:HelloWorldResponse"/>
>> 	</wsdl:message>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Additional-element-in-Request-Packet-%28SOAP-payload-%29-is-generated-with-name-arg0-tf4370745.html#a12469330
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Additional element in Request Packet (SOAP payload ) is generated with name arg0

Posted by Glen Mazza <gl...@verizon.net>.
This seems to be a simple web service, so I am not sure of the problem
Can we see the <wsdl:binding/> and <wsdl:portType/> section for this
operation--that might be helpful in determining the types of message
being sent--doc/lit, doc/lit wrapped, rpc/literal?

Thanks,
Glen

Am Montag, den 03.09.2007, 00:37 -0700 schrieb vashistvishal:
> I'm consuming a service using CXF client which uses this wsdl mentioned
> below.
> 
> When the outgoing message is sent it adds _arg0_ in soap packet, which is
> one 
> element extra, client is not expecting this.
> 
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body><ns2:HelloWorld
> xmlns:ns2="http://www.superpartners.com.au/matt.HelloWorld3">
> <arg0>
> <id>HELLO VISHAL</id>
> </arg0>
> </ns2:HelloWorld>
> </soap:Body>
> </soap:Envelope>
> --------------------------------------
>  
> My cleint is expecting this...packet.
> 
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body><ns2:HelloWorld
> xmlns:ns2="http://www.superpartners.com.au/matt.HelloWorld3">
> 
> <id>HELLO VISHAL</id>
> 
> </ns2:HelloWorld>
> </soap:Body>
> </soap:Envelope>
> 
> -----
> This issue seems to be with java or CXF implementation. Any help will be
> good 
> or pointers to remove this additional elemnt which seems to be coming in no
> mmater what 
> i do with WSDL.
>  Is this soemthing to do with Java lang specific or i'm making some dumb
> mistake.
> 
> Part of WSDL is shopwn below
> 
> <xsd:element name="HelloWorld" type="tns:HelloWorld"/>
>    <xsd:element name="HelloWorldResponse" type="tns:HelloWorldResponse"/>
>     	
>     <xsd:complexType name='HelloWorld'>
>     <xsd:sequence>
>      <xsd:element minOccurs='0' name='arg0' type="tns:HelloWorldReq"/>
>     </xsd:sequence>
>    </xsd:complexType>
>   
>    <xsd:complexType name='HelloWorldReq'>
>     <xsd:sequence>
>      <xsd:element minOccurs='0' name='id' type='xsd:string'/>
>      </xsd:sequence>
>    </xsd:complexType>
>   
>    <xsd:complexType name='HelloWorldResponse'>
>     <xsd:sequence>
>      <xsd:element minOccurs='0' name='return' type='tns:HelloWorldResp'/>
>     </xsd:sequence>
>    </xsd:complexType>
>   
>    <xsd:complexType name='HelloWorldResp'>
>     <xsd:sequence>
>      <xsd:element minOccurs='0' name='result' type='xsd:string'/>
>     </xsd:sequence>
>    </xsd:complexType>       
>    </xsd:schema>
>     
> 	</wsdl:types>
> 	
> 	<wsdl:message name="HelloWorldIn">
> 		<wsdl:part name="HelloWorld" element="tns:HelloWorld"/>
> 	</wsdl:message>
> 	
> 	<wsdl:message name="HelloWorldOutput">
> 		<wsdl:part name="HelloWorldResponse" element="tns:HelloWorldResponse"/>
> 	</wsdl:message>


Re: Additional element in Request Packet (SOAP payload ) is generated with name arg0

Posted by vashistvishal <va...@gmail.com>.
Hi Dan thanks for yr reply and invaluable tip.

I'm using wsdl first approach (top down) and yr tip has made it going... :)

I'm highly thankful to you and Glen.



dkulp wrote:
> 
> 
> We'd need some additional information...
> 
> Is this a "wsdl first" scenario or a Java first scenario?
> 
> That's important.   If it's wsdl first, just change the wsdl.   Change 
> the "HelloWorld" element to point at the tns:HelloWorldReq type.  Remove 
> the HelloWorld complexType entirely.
> 
> For Java first, I'd have to see the interface that you are trying to use.   
> Most likely, it's just a matter of annotating the method with:
> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> to force it into bare mode.
> 
> Dan
> 
> 
> 
> On Monday 03 September 2007, vashistvishal wrote:
>> Thanks Glen and Dan.
>>
>> If this the case (that arg0 is a correct arg in SOAP packet), then
>> please point me how do i send the
>> packet without this, becuse my intention is to send a warpper class
>> which contains _id_ as a _string_.
>> In this case that is HelloWorldReq.
>>
>> So in a nutshell i want to send this over the wire which will have
>> only _id_ in it and no _arg0_.
>> And similarly i should get a respsone back which is of type
>> HelloWorldResp (which has only
>> one element of type _string_ and named _result_)
>>
>> What modifications i require on _wsdl_ to make this happens
>>
>> Any pointers what is required or i'm making some dumb mistakes.
>>
>> dkulp wrote:
>> > Looking at the schema, it looks like the CXF message is correct.
>> >
>> > The operation message points at the HelloWorld element:
>> > <xsd:element name="HelloWorld" type="tns:HelloWorld"/>
>> >
>> >
>> > The HelloWorld type is a sequence with an arg0 element:
>> > <xsd:complexType name='HelloWorld'>
>> >     <xsd:sequence>
>> >       <xsd:element minOccurs='0' name='arg0'
>> > type="tns:HelloWorldReq"/> </xsd:sequence>
>> > </xsd:complexType>
>> >
>> > Thus the arg0 should be there according to the schema.
>> >
>> > Dan
>> >
>> > On Monday 03 September 2007, vashistvishal wrote:
>> >> I'm consuming a service using CXF client which uses this wsdl
>> >> mentioned below.
>> >>
>> >> When the outgoing message is sent it adds _arg0_ in soap packet,
>> >>
>> >> is one
>> >> element extra, client is not expecting this.
>> >>
>> >> <soap:Envelope
>> >> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>> >> <soap:Body><ns2:HelloWorld
>> >> xmlns:ns2="http://www.superpartners.com.au/matt.HelloWorld3">
>> >> <arg0>
>> >> <id>HELLO VISHAL</id>
>> >> </arg0>
>> >> </ns2:HelloWorld>
>> >> </soap:Body>
>> >> </soap:Envelope>
>> >> --------------------------------------
>> >>
>> >> My cleint is expecting this...packet.
>> >>
>> >> <soap:Envelope
>> >> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>> >> <soap:Body><ns2:HelloWorld
>> >> xmlns:ns2="http://www.superpartners.com.au/matt.HelloWorld3">
>> >>
>> >> <id>HELLO VISHAL</id>
>> >>
>> >> </ns2:HelloWorld>
>> >> </soap:Body>
>> >> </soap:Envelope>
>> >>
>> >> -----
>> >> This issue seems to be with java or CXF implementation. Any help
>> >> will be good
>> >> or pointers to remove this additional elemnt which seems to be
>> >> coming in no mmater what
>> >> i do with WSDL.
>> >>  Is this soemthing to do with Java lang specific or i'm making some
>> >> dumb mistake.
>> >>
>> >> Part of WSDL is shopwn below
>> >>
>> >> <xsd:element name="HelloWorld" type="tns:HelloWorld"/>
>> >>    <xsd:element name="HelloWorldResponse"
>> >> type="tns:HelloWorldResponse"/>
>> >>
>> >>     <xsd:complexType name='HelloWorld'>
>> >>     <xsd:sequence>
>> >>      <xsd:element minOccurs='0' name='arg0'
>> >> type="tns:HelloWorldReq"/> </xsd:sequence>
>> >>    </xsd:complexType>
>> >>
>> >>    <xsd:complexType name='HelloWorldReq'>
>> >>     <xsd:sequence>
>> >>      <xsd:element minOccurs='0' name='id' type='xsd:string'/>
>> >>      </xsd:sequence>
>> >>    </xsd:complexType>
>> >>
>> >>    <xsd:complexType name='HelloWorldResponse'>
>> >>     <xsd:sequence>
>> >>      <xsd:element minOccurs='0' name='return'
>> >> type='tns:HelloWorldResp'/> </xsd:sequence>
>> >>    </xsd:complexType>
>> >>
>> >>    <xsd:complexType name='HelloWorldResp'>
>> >>     <xsd:sequence>
>> >>      <xsd:element minOccurs='0' name='result' type='xsd:string'/>
>> >>     </xsd:sequence>
>> >>    </xsd:complexType>
>> >>    </xsd:schema>
>> >>
>> >> 	</wsdl:types>
>> >>
>> >> 	<wsdl:message name="HelloWorldIn">
>> >> 		<wsdl:part name="HelloWorld" element="tns:HelloWorld"/>
>> >> 	</wsdl:message>
>> >>
>> >> 	<wsdl:message name="HelloWorldOutput">
>> >> 		<wsdl:part name="HelloWorldResponse"
>> >> element="tns:HelloWorldResponse"/> </wsdl:message>
>> >
>> > --
>> > J. Daniel Kulp
>> > Principal Engineer
>> > IONA
>> > P: 781-902-8727    C: 508-380-7194
>> > daniel.kulp@iona.com
>> > http://www.dankulp.com/blog
> 
> 
> 
> -- 
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727    C: 508-380-7194
> daniel.kulp@iona.com
> http://www.dankulp.com/blog
> 
> 

-- 
View this message in context: http://www.nabble.com/Additional-element-in-Request-Packet-%28SOAP-payload-%29-is-generated-with-name-arg0-tf4370745.html#a12513680
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Additional element in Request Packet (SOAP payload ) is generated with name arg0

Posted by Daniel Kulp <dk...@apache.org>.
We'd need some additional information...

Is this a "wsdl first" scenario or a Java first scenario?

That's important.   If it's wsdl first, just change the wsdl.   Change 
the "HelloWorld" element to point at the tns:HelloWorldReq type.  Remove 
the HelloWorld complexType entirely.

For Java first, I'd have to see the interface that you are trying to use.   
Most likely, it's just a matter of annotating the method with:
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
to force it into bare mode.

Dan



On Monday 03 September 2007, vashistvishal wrote:
> Thanks Glen and Dan.
>
> If this the case (that arg0 is a correct arg in SOAP packet), then
> please point me how do i send the
> packet without this, becuse my intention is to send a warpper class
> which contains _id_ as a _string_.
> In this case that is HelloWorldReq.
>
> So in a nutshell i want to send this over the wire which will have
> only _id_ in it and no _arg0_.
> And similarly i should get a respsone back which is of type
> HelloWorldResp (which has only
> one element of type _string_ and named _result_)
>
> What modifications i require on _wsdl_ to make this happens
>
> Any pointers what is required or i'm making some dumb mistakes.
>
> dkulp wrote:
> > Looking at the schema, it looks like the CXF message is correct.
> >
> > The operation message points at the HelloWorld element:
> > <xsd:element name="HelloWorld" type="tns:HelloWorld"/>
> >
> >
> > The HelloWorld type is a sequence with an arg0 element:
> > <xsd:complexType name='HelloWorld'>
> >     <xsd:sequence>
> >       <xsd:element minOccurs='0' name='arg0'
> > type="tns:HelloWorldReq"/> </xsd:sequence>
> > </xsd:complexType>
> >
> > Thus the arg0 should be there according to the schema.
> >
> > Dan
> >
> > On Monday 03 September 2007, vashistvishal wrote:
> >> I'm consuming a service using CXF client which uses this wsdl
> >> mentioned below.
> >>
> >> When the outgoing message is sent it adds _arg0_ in soap packet,
> >>
> >> is one
> >> element extra, client is not expecting this.
> >>
> >> <soap:Envelope
> >> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> >> <soap:Body><ns2:HelloWorld
> >> xmlns:ns2="http://www.superpartners.com.au/matt.HelloWorld3">
> >> <arg0>
> >> <id>HELLO VISHAL</id>
> >> </arg0>
> >> </ns2:HelloWorld>
> >> </soap:Body>
> >> </soap:Envelope>
> >> --------------------------------------
> >>
> >> My cleint is expecting this...packet.
> >>
> >> <soap:Envelope
> >> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> >> <soap:Body><ns2:HelloWorld
> >> xmlns:ns2="http://www.superpartners.com.au/matt.HelloWorld3">
> >>
> >> <id>HELLO VISHAL</id>
> >>
> >> </ns2:HelloWorld>
> >> </soap:Body>
> >> </soap:Envelope>
> >>
> >> -----
> >> This issue seems to be with java or CXF implementation. Any help
> >> will be good
> >> or pointers to remove this additional elemnt which seems to be
> >> coming in no mmater what
> >> i do with WSDL.
> >>  Is this soemthing to do with Java lang specific or i'm making some
> >> dumb mistake.
> >>
> >> Part of WSDL is shopwn below
> >>
> >> <xsd:element name="HelloWorld" type="tns:HelloWorld"/>
> >>    <xsd:element name="HelloWorldResponse"
> >> type="tns:HelloWorldResponse"/>
> >>
> >>     <xsd:complexType name='HelloWorld'>
> >>     <xsd:sequence>
> >>      <xsd:element minOccurs='0' name='arg0'
> >> type="tns:HelloWorldReq"/> </xsd:sequence>
> >>    </xsd:complexType>
> >>
> >>    <xsd:complexType name='HelloWorldReq'>
> >>     <xsd:sequence>
> >>      <xsd:element minOccurs='0' name='id' type='xsd:string'/>
> >>      </xsd:sequence>
> >>    </xsd:complexType>
> >>
> >>    <xsd:complexType name='HelloWorldResponse'>
> >>     <xsd:sequence>
> >>      <xsd:element minOccurs='0' name='return'
> >> type='tns:HelloWorldResp'/> </xsd:sequence>
> >>    </xsd:complexType>
> >>
> >>    <xsd:complexType name='HelloWorldResp'>
> >>     <xsd:sequence>
> >>      <xsd:element minOccurs='0' name='result' type='xsd:string'/>
> >>     </xsd:sequence>
> >>    </xsd:complexType>
> >>    </xsd:schema>
> >>
> >> 	</wsdl:types>
> >>
> >> 	<wsdl:message name="HelloWorldIn">
> >> 		<wsdl:part name="HelloWorld" element="tns:HelloWorld"/>
> >> 	</wsdl:message>
> >>
> >> 	<wsdl:message name="HelloWorldOutput">
> >> 		<wsdl:part name="HelloWorldResponse"
> >> element="tns:HelloWorldResponse"/> </wsdl:message>
> >
> > --
> > J. Daniel Kulp
> > Principal Engineer
> > IONA
> > P: 781-902-8727    C: 508-380-7194
> > daniel.kulp@iona.com
> > http://www.dankulp.com/blog



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

Re: Additional element in Request Packet (SOAP payload ) is generated with name arg0

Posted by vashistvishal <va...@gmail.com>.
Thanks Glen and Dan.

If this the case (that arg0 is a correct arg in SOAP packet), then please
point me how do i send the 
packet without this, becuse my intention is to send a warpper class which
contains _id_ as a _string_.
In this case that is HelloWorldReq.

So in a nutshell i want to send this over the wire which will have only _id_
in it and no _arg0_.
And similarly i should get a respsone back which is of type HelloWorldResp
(which has only 
one element of type _string_ and named _result_)

What modifications i require on _wsdl_ to make this happens

Any pointers what is required or i'm making some dumb mistakes.



dkulp wrote:
> 
> 
> Looking at the schema, it looks like the CXF message is correct.
> 
> The operation message points at the HelloWorld element:
> <xsd:element name="HelloWorld" type="tns:HelloWorld"/>
> 
> 
> The HelloWorld type is a sequence with an arg0 element:
> <xsd:complexType name='HelloWorld'>
>     <xsd:sequence>
>       <xsd:element minOccurs='0' name='arg0' type="tns:HelloWorldReq"/>
>     </xsd:sequence>
> </xsd:complexType>
> 
> Thus the arg0 should be there according to the schema.
> 
> Dan
> 
> 
> 
> On Monday 03 September 2007, vashistvishal wrote:
>> I'm consuming a service using CXF client which uses this wsdl
>> mentioned below.
>>
>> When the outgoing message is sent it adds _arg0_ in soap packet, 
> 
>> is one
>> element extra, client is not expecting this.
>>
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>> <soap:Body><ns2:HelloWorld
>> xmlns:ns2="http://www.superpartners.com.au/matt.HelloWorld3">
>> <arg0>
>> <id>HELLO VISHAL</id>
>> </arg0>
>> </ns2:HelloWorld>
>> </soap:Body>
>> </soap:Envelope>
>> --------------------------------------
>>
>> My cleint is expecting this...packet.
>>
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>> <soap:Body><ns2:HelloWorld
>> xmlns:ns2="http://www.superpartners.com.au/matt.HelloWorld3">
>>
>> <id>HELLO VISHAL</id>
>>
>> </ns2:HelloWorld>
>> </soap:Body>
>> </soap:Envelope>
>>
>> -----
>> This issue seems to be with java or CXF implementation. Any help will
>> be good
>> or pointers to remove this additional elemnt which seems to be coming
>> in no mmater what
>> i do with WSDL.
>>  Is this soemthing to do with Java lang specific or i'm making some
>> dumb mistake.
>>
>> Part of WSDL is shopwn below
>>
>> <xsd:element name="HelloWorld" type="tns:HelloWorld"/>
>>    <xsd:element name="HelloWorldResponse"
>> type="tns:HelloWorldResponse"/>
>>
>>     <xsd:complexType name='HelloWorld'>
>>     <xsd:sequence>
>>      <xsd:element minOccurs='0' name='arg0' type="tns:HelloWorldReq"/>
>>     </xsd:sequence>
>>    </xsd:complexType>
>>
>>    <xsd:complexType name='HelloWorldReq'>
>>     <xsd:sequence>
>>      <xsd:element minOccurs='0' name='id' type='xsd:string'/>
>>      </xsd:sequence>
>>    </xsd:complexType>
>>
>>    <xsd:complexType name='HelloWorldResponse'>
>>     <xsd:sequence>
>>      <xsd:element minOccurs='0' name='return'
>> type='tns:HelloWorldResp'/> </xsd:sequence>
>>    </xsd:complexType>
>>
>>    <xsd:complexType name='HelloWorldResp'>
>>     <xsd:sequence>
>>      <xsd:element minOccurs='0' name='result' type='xsd:string'/>
>>     </xsd:sequence>
>>    </xsd:complexType>
>>    </xsd:schema>
>>
>> 	</wsdl:types>
>>
>> 	<wsdl:message name="HelloWorldIn">
>> 		<wsdl:part name="HelloWorld" element="tns:HelloWorld"/>
>> 	</wsdl:message>
>>
>> 	<wsdl:message name="HelloWorldOutput">
>> 		<wsdl:part name="HelloWorldResponse"
>> element="tns:HelloWorldResponse"/> </wsdl:message>
> 
> 
> 
> -- 
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727    C: 508-380-7194
> daniel.kulp@iona.com
> http://www.dankulp.com/blog
> 
> 

-- 
View this message in context: http://www.nabble.com/Additional-element-in-Request-Packet-%28SOAP-payload-%29-is-generated-with-name-arg0-tf4370745.html#a12469617
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Additional element in Request Packet (SOAP payload ) is generated with name arg0

Posted by Daniel Kulp <dk...@apache.org>.
Looking at the schema, it looks like the CXF message is correct.

The operation message points at the HelloWorld element:
<xsd:element name="HelloWorld" type="tns:HelloWorld"/>


The HelloWorld type is a sequence with an arg0 element:
<xsd:complexType name='HelloWorld'>
    <xsd:sequence>
      <xsd:element minOccurs='0' name='arg0' type="tns:HelloWorldReq"/>
    </xsd:sequence>
</xsd:complexType>

Thus the arg0 should be there according to the schema.

Dan



On Monday 03 September 2007, vashistvishal wrote:
> I'm consuming a service using CXF client which uses this wsdl
> mentioned below.
>
> When the outgoing message is sent it adds _arg0_ in soap packet, which
> is one
> element extra, client is not expecting this.
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body><ns2:HelloWorld
> xmlns:ns2="http://www.superpartners.com.au/matt.HelloWorld3">
> <arg0>
> <id>HELLO VISHAL</id>
> </arg0>
> </ns2:HelloWorld>
> </soap:Body>
> </soap:Envelope>
> --------------------------------------
>
> My cleint is expecting this...packet.
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body><ns2:HelloWorld
> xmlns:ns2="http://www.superpartners.com.au/matt.HelloWorld3">
>
> <id>HELLO VISHAL</id>
>
> </ns2:HelloWorld>
> </soap:Body>
> </soap:Envelope>
>
> -----
> This issue seems to be with java or CXF implementation. Any help will
> be good
> or pointers to remove this additional elemnt which seems to be coming
> in no mmater what
> i do with WSDL.
>  Is this soemthing to do with Java lang specific or i'm making some
> dumb mistake.
>
> Part of WSDL is shopwn below
>
> <xsd:element name="HelloWorld" type="tns:HelloWorld"/>
>    <xsd:element name="HelloWorldResponse"
> type="tns:HelloWorldResponse"/>
>
>     <xsd:complexType name='HelloWorld'>
>     <xsd:sequence>
>      <xsd:element minOccurs='0' name='arg0' type="tns:HelloWorldReq"/>
>     </xsd:sequence>
>    </xsd:complexType>
>
>    <xsd:complexType name='HelloWorldReq'>
>     <xsd:sequence>
>      <xsd:element minOccurs='0' name='id' type='xsd:string'/>
>      </xsd:sequence>
>    </xsd:complexType>
>
>    <xsd:complexType name='HelloWorldResponse'>
>     <xsd:sequence>
>      <xsd:element minOccurs='0' name='return'
> type='tns:HelloWorldResp'/> </xsd:sequence>
>    </xsd:complexType>
>
>    <xsd:complexType name='HelloWorldResp'>
>     <xsd:sequence>
>      <xsd:element minOccurs='0' name='result' type='xsd:string'/>
>     </xsd:sequence>
>    </xsd:complexType>
>    </xsd:schema>
>
> 	</wsdl:types>
>
> 	<wsdl:message name="HelloWorldIn">
> 		<wsdl:part name="HelloWorld" element="tns:HelloWorld"/>
> 	</wsdl:message>
>
> 	<wsdl:message name="HelloWorldOutput">
> 		<wsdl:part name="HelloWorldResponse"
> element="tns:HelloWorldResponse"/> </wsdl:message>



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog