You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Kaleb Walton <kd...@us.ibm.com> on 2007/11/26 20:10:55 UTC

Missing namespace prefix on arg0 ?


This may be due to my lack of expertise with XML / WSDLs in general but I
am confused as to why the <arg0> tag below does not include the ns1: prefix
as the rest of the tags do. If I add the ns1: prefix to <arg0> (to make it
<ns1:arg0>) CXF does not digest the request properly. Is there any way to
apply a namespace to the arg tag or should I not be concerned with it?

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="
http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd3="
http://www.w3.org/2001/XMLSchema" xmlns:xsd="
http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:findAll xmlns:ns1="http://services.iss.net/v1" SOAP-ENC:root="1">
<arg0>
<ns1:sort xsi:type="xsd:string">startTime.ASC</ns1:sort>
<ns1:startDate
xsi:type="xsd3:dateTime">2006-11-26T11:56:11Z</ns1:startDate>
<ns1:endDate xsi:type="xsd3:dateTime">2007-11-26T11:56:11Z</ns1:endDate>
<ns1:populate xsi:type="xsd:string">true</ns1:populate>
<ns1:start xsi:type="xsd:int">0</ns1:start>
<ns1:limit xsi:type="xsd:int">100</ns1:limit>
<ns1:customerId xsi:type="xsd:string">CID001696</ns1:customerId>
</arg0>
</ns1:findAll>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Regards,
Kaleb

RE: Missing namespace prefix on arg0 ?

Posted by Glen Mazza <gl...@verizon.net>.
Am Mittwoch, den 28.11.2007, 12:58 -0500 schrieb Benson Margulies:
> Prescription in several steps:
>  
> 1) Always use @WebParam to specify nice names for interface parameters.
> 2) Pick one of:
>   a) stop using doc/lit/wrapped. Use doc/lit/bare, and then put a
> package-info.java with an @XmlSchema in it into your package to specify
> the desired element form.
>  b) ensure that the method is in the same namespace as at least one
> class that gets JAXB processing, and control the element form in the
> package.
>  
> The need for #2 might be a bug, but I'm not competent to judge. I did
> open a JIRA. Maybe Glen has a theory?
>  

No, these are usually Dan K.-type questions.

Glen


> --benson
>  
> 
> 
> ________________________________
> 
> 	From: Kaleb Walton [mailto:kdwalton@us.ibm.com] 
> 	Sent: Wednesday, November 28, 2007 10:17 AM
> 	To: cxf-user@incubator.apache.org
> 	Subject: RE: Missing namespace prefix on arg0 ?
> 	
> 	
> 
> 	Yes, code first and yes I do see
> elementFormDefault="unqualified" in the WSDL. Is that the reason? If so,
> how might I get rid of that?
> 	
> 	Regards,
> 	Kaleb
> 	
> 	Inactive hide details for "Benson Margulies" ---11/26/2007
> 04:22:59 PM---Look at the schema for elementFormDefault and/or
> speci"Benson Margulies" ---11/26/2007 04:22:59 PM---Look at the schema
> for elementFormDefault and/or specific form=
> 	
> 	
> 
> From:	 
> "Benson Margulies" <bi...@basistech.com>	
> 
> To:	 
> <cx...@incubator.apache.org>	
> 
> Date:	 
> 11/26/2007 04:22 PM	
> 
> Subject:	 
> RE: Missing namespace prefix on arg0 ?	
> ________________________________
> 
> 
> 
> 
> 	Look at the schema for elementFormDefault and/or specific form=
> 	modifiers. Code first? RPC or Doc? 
> 	
> 	> -----Original Message-----
> 	> From: Kaleb Walton [mailto:kdwalton@us.ibm.com] 
> 	> Sent: Monday, November 26, 2007 2:11 PM
> 	> To: cxf-user@incubator.apache.org
> 	> Subject: Missing namespace prefix on arg0 ?
> 	> 
> 	> 
> 	> 
> 	> This may be due to my lack of expertise with XML / WSDLs in 
> 	> general but I am confused as to why the <arg0> tag below does 
> 	> not include the ns1: prefix as the rest of the tags do. If I 
> 	> add the ns1: prefix to <arg0> (to make it
> 	> <ns1:arg0>) CXF does not digest the request properly. Is 
> 	> there any way to apply a namespace to the arg tag or should I 
> 	> not be concerned with it?
> 	> 
> 	> <?xml version="1.0" encoding="UTF-8"?>
> 	> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="
> 	> http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="
> 	> http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="
> 	> http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENV="
> 	> http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd3="
> 	> http://www.w3.org/2001/XMLSchema" xmlns:xsd="
> 	> http://www.w3.org/1999/XMLSchema">
> 	> <SOAP-ENV:Body>
> 	> <ns1:findAll xmlns:ns1="http://services.iss.net/v1" 
> 	> SOAP-ENC:root="1"> <arg0> <ns1:sort 
> 	> xsi:type="xsd:string">startTime.ASC</ns1:sort>
> 	> <ns1:startDate
> 	> xsi:type="xsd3:dateTime">2006-11-26T11:56:11Z</ns1:startDate>
> 	> <ns1:endDate 
> 	> xsi:type="xsd3:dateTime">2007-11-26T11:56:11Z</ns1:endDate>
> 	> <ns1:populate xsi:type="xsd:string">true</ns1:populate>
> 	> <ns1:start xsi:type="xsd:int">0</ns1:start> <ns1:limit 
> 	> xsi:type="xsd:int">100</ns1:limit>
> 	> <ns1:customerId
> xsi:type="xsd:string">CID001696</ns1:customerId>
> 	> </arg0>
> 	> </ns1:findAll>
> 	> </SOAP-ENV:Body>
> 	> </SOAP-ENV:Envelope>
> 	> 
> 	> Regards,
> 	> Kaleb
> 	> 
> 	
> 	
> 


RE: Missing namespace prefix on arg0 ?

Posted by Benson Margulies <bi...@basistech.com>.
Prescription in several steps:
 
1) Always use @WebParam to specify nice names for interface parameters.
2) Pick one of:
  a) stop using doc/lit/wrapped. Use doc/lit/bare, and then put a
package-info.java with an @XmlSchema in it into your package to specify
the desired element form.
 b) ensure that the method is in the same namespace as at least one
class that gets JAXB processing, and control the element form in the
package.
 
The need for #2 might be a bug, but I'm not competent to judge. I did
open a JIRA. Maybe Glen has a theory?
 
--benson
 


________________________________

	From: Kaleb Walton [mailto:kdwalton@us.ibm.com] 
	Sent: Wednesday, November 28, 2007 10:17 AM
	To: cxf-user@incubator.apache.org
	Subject: RE: Missing namespace prefix on arg0 ?
	
	

	Yes, code first and yes I do see
elementFormDefault="unqualified" in the WSDL. Is that the reason? If so,
how might I get rid of that?
	
	Regards,
	Kaleb
	
	Inactive hide details for "Benson Margulies" ---11/26/2007
04:22:59 PM---Look at the schema for elementFormDefault and/or
speci"Benson Margulies" ---11/26/2007 04:22:59 PM---Look at the schema
for elementFormDefault and/or specific form=
	
	

From:	 
"Benson Margulies" <bi...@basistech.com>	

To:	 
<cx...@incubator.apache.org>	

Date:	 
11/26/2007 04:22 PM	

Subject:	 
RE: Missing namespace prefix on arg0 ?	
________________________________




	Look at the schema for elementFormDefault and/or specific form=
	modifiers. Code first? RPC or Doc? 
	
	> -----Original Message-----
	> From: Kaleb Walton [mailto:kdwalton@us.ibm.com] 
	> Sent: Monday, November 26, 2007 2:11 PM
	> To: cxf-user@incubator.apache.org
	> Subject: Missing namespace prefix on arg0 ?
	> 
	> 
	> 
	> This may be due to my lack of expertise with XML / WSDLs in 
	> general but I am confused as to why the <arg0> tag below does 
	> not include the ns1: prefix as the rest of the tags do. If I 
	> add the ns1: prefix to <arg0> (to make it
	> <ns1:arg0>) CXF does not digest the request properly. Is 
	> there any way to apply a namespace to the arg tag or should I 
	> not be concerned with it?
	> 
	> <?xml version="1.0" encoding="UTF-8"?>
	> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="
	> http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="
	> http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="
	> http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENV="
	> http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd3="
	> http://www.w3.org/2001/XMLSchema" xmlns:xsd="
	> http://www.w3.org/1999/XMLSchema">
	> <SOAP-ENV:Body>
	> <ns1:findAll xmlns:ns1="http://services.iss.net/v1" 
	> SOAP-ENC:root="1"> <arg0> <ns1:sort 
	> xsi:type="xsd:string">startTime.ASC</ns1:sort>
	> <ns1:startDate
	> xsi:type="xsd3:dateTime">2006-11-26T11:56:11Z</ns1:startDate>
	> <ns1:endDate 
	> xsi:type="xsd3:dateTime">2007-11-26T11:56:11Z</ns1:endDate>
	> <ns1:populate xsi:type="xsd:string">true</ns1:populate>
	> <ns1:start xsi:type="xsd:int">0</ns1:start> <ns1:limit 
	> xsi:type="xsd:int">100</ns1:limit>
	> <ns1:customerId
xsi:type="xsd:string">CID001696</ns1:customerId>
	> </arg0>
	> </ns1:findAll>
	> </SOAP-ENV:Body>
	> </SOAP-ENV:Envelope>
	> 
	> Regards,
	> Kaleb
	> 
	
	


RE: Missing namespace prefix on arg0 ?

Posted by Kaleb Walton <kd...@us.ibm.com>.
Yes, code first and yes I do see elementFormDefault="unqualified" in the
WSDL. Is that the reason? If so, how might I get rid of that?

Regards,
Kaleb


|------------>
| From:      |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |"Benson Margulies" <bi...@basistech.com>                                                                                                        |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |<cx...@incubator.apache.org>                                                                                                                   |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |11/26/2007 04:22 PM                                                                                                                               |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |RE: Missing namespace prefix on arg0 ?                                                                                                            |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|





Look at the schema for elementFormDefault and/or specific form=
modifiers. Code first? RPC or Doc?

> -----Original Message-----
> From: Kaleb Walton [mailto:kdwalton@us.ibm.com]
> Sent: Monday, November 26, 2007 2:11 PM
> To: cxf-user@incubator.apache.org
> Subject: Missing namespace prefix on arg0 ?
>
>
>
> This may be due to my lack of expertise with XML / WSDLs in
> general but I am confused as to why the <arg0> tag below does
> not include the ns1: prefix as the rest of the tags do. If I
> add the ns1: prefix to <arg0> (to make it
> <ns1:arg0>) CXF does not digest the request properly. Is
> there any way to apply a namespace to the arg tag or should I
> not be concerned with it?
>
> <?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="
> http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="
> http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENV="
> http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd3="
> http://www.w3.org/2001/XMLSchema" xmlns:xsd="
> http://www.w3.org/1999/XMLSchema">
> <SOAP-ENV:Body>
> <ns1:findAll xmlns:ns1="http://services.iss.net/v1"
> SOAP-ENC:root="1"> <arg0> <ns1:sort
> xsi:type="xsd:string">startTime.ASC</ns1:sort>
> <ns1:startDate
> xsi:type="xsd3:dateTime">2006-11-26T11:56:11Z</ns1:startDate>
> <ns1:endDate
> xsi:type="xsd3:dateTime">2007-11-26T11:56:11Z</ns1:endDate>
> <ns1:populate xsi:type="xsd:string">true</ns1:populate>
> <ns1:start xsi:type="xsd:int">0</ns1:start> <ns1:limit
> xsi:type="xsd:int">100</ns1:limit>
> <ns1:customerId xsi:type="xsd:string">CID001696</ns1:customerId>
> </arg0>
> </ns1:findAll>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> Regards,
> Kaleb
>

RE: Missing namespace prefix on arg0 ?

Posted by Benson Margulies <bi...@basistech.com>.
Look at the schema for elementFormDefault and/or specific form=
modifiers. Code first? RPC or Doc? 

> -----Original Message-----
> From: Kaleb Walton [mailto:kdwalton@us.ibm.com] 
> Sent: Monday, November 26, 2007 2:11 PM
> To: cxf-user@incubator.apache.org
> Subject: Missing namespace prefix on arg0 ?
> 
> 
> 
> This may be due to my lack of expertise with XML / WSDLs in 
> general but I am confused as to why the <arg0> tag below does 
> not include the ns1: prefix as the rest of the tags do. If I 
> add the ns1: prefix to <arg0> (to make it
> <ns1:arg0>) CXF does not digest the request properly. Is 
> there any way to apply a namespace to the arg tag or should I 
> not be concerned with it?
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="
> http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="
> http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENV="
> http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd3="
> http://www.w3.org/2001/XMLSchema" xmlns:xsd="
> http://www.w3.org/1999/XMLSchema">
> <SOAP-ENV:Body>
> <ns1:findAll xmlns:ns1="http://services.iss.net/v1" 
> SOAP-ENC:root="1"> <arg0> <ns1:sort 
> xsi:type="xsd:string">startTime.ASC</ns1:sort>
> <ns1:startDate
> xsi:type="xsd3:dateTime">2006-11-26T11:56:11Z</ns1:startDate>
> <ns1:endDate 
> xsi:type="xsd3:dateTime">2007-11-26T11:56:11Z</ns1:endDate>
> <ns1:populate xsi:type="xsd:string">true</ns1:populate>
> <ns1:start xsi:type="xsd:int">0</ns1:start> <ns1:limit 
> xsi:type="xsd:int">100</ns1:limit>
> <ns1:customerId xsi:type="xsd:string">CID001696</ns1:customerId>
> </arg0>
> </ns1:findAll>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> 
> Regards,
> Kaleb
> 

Re: Missing namespace prefix on arg0 ?

Posted by Daniel Kulp <dk...@apache.org>.
Well, this is a soap encoded message which technically CXF doesn't 
support.

That said, if it's encoded, it's most likely a RPC service.   
(rpc/encoded was popular for a bit) The WS-I BP specifically REQUIRES 
that part accessors for RPC parts to be namespace UNQUALIFIED.   (aka: 
not in a namespace)     Thus, this message may be ok for a RPC service.

Dan


On Monday 26 November 2007, Kaleb Walton wrote:
> This may be due to my lack of expertise with XML / WSDLs in general
> but I am confused as to why the <arg0> tag below does not include the
> ns1: prefix as the rest of the tags do. If I add the ns1: prefix to
> <arg0> (to make it <ns1:arg0>) CXF does not digest the request
> properly. Is there any way to apply a namespace to the arg tag or
> should I not be concerned with it?
>
> <?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="
> http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="
> http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENV="
> http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd3="
> http://www.w3.org/2001/XMLSchema" xmlns:xsd="
> http://www.w3.org/1999/XMLSchema">
> <SOAP-ENV:Body>
> <ns1:findAll xmlns:ns1="http://services.iss.net/v1" SOAP-ENC:root="1">
> <arg0>
> <ns1:sort xsi:type="xsd:string">startTime.ASC</ns1:sort>
> <ns1:startDate
> xsi:type="xsd3:dateTime">2006-11-26T11:56:11Z</ns1:startDate>
> <ns1:endDate
> xsi:type="xsd3:dateTime">2007-11-26T11:56:11Z</ns1:endDate>
> <ns1:populate xsi:type="xsd:string">true</ns1:populate>
> <ns1:start xsi:type="xsd:int">0</ns1:start>
> <ns1:limit xsi:type="xsd:int">100</ns1:limit>
> <ns1:customerId xsi:type="xsd:string">CID001696</ns1:customerId>
> </arg0>
> </ns1:findAll>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> Regards,
> Kaleb



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