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 error3 <er...@free.fr> on 2009/08/24 23:36:00 UTC

Problem with ns qualified attribute of a client message

Hello,

I do have a problem with a axis2 generated webservice client.
The webservice  I use is the standard one specified by EPCglobal (file a
use to generate the client are on
http://www.epcglobalinc.org/standards/epcis)

My problem is that the current code :

		QueryParams params = new QueryParams();
		QueryParam p1 = new QueryParam();
		p1.setName("eventType");
		p1.setValue("ObjectEvent");
		params.addParam(p1);
		
		Poll polData = new Poll();
		polData.setQueryName("SimpleEventQuery");
		polData.setParams(params);
		
		PollE poll = new PollE();
		poll.setPoll(polData);
		
		
		EPCglobalEPCISServiceStub myStub = new EPCglobalEPCISServiceStub("http://localhost:8080/Test");
		
		myStub.poll(poll);

Generate a SOAP message like this :

<?xml version='1.0' encoding='utf-8'?>
	<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
		<soapenv:Body>
			<ns5:Poll xmlns:ns5="urn:epcglobal:epcis-query:xsd:1">
				<queryName>SimpleEventQuery</queryName>
				<params><param><name>eventType</name>
				<value xmlns:s1="http://www.w3.org/2001/XMLSchema-instance" xmlns:s2="http://www.w3.org/2001/XMLSchema" s1:type="s2:string">ObjectEvent</value></param></params>
			</ns5:Poll>
		</soapenv:Body>
</soapenv:Envelope>

My problem is the server. I don't have access to the code on it
(proprietary solution :-/). And it does not work as it does not want
fully qualified type attribute like the ones in <value> tag. It's
waiting for 
<value>ObjectEvent</value>
instead of :
<value xmlns:s1="http://www.w3.org/2001/XMLSchema-instance"
xmlns:s2="http://www.w3.org/2001/XMLSchema"
s1:type="s2:string">ObjectEvent</value>

any tips to get rid of this attributes ?

Thank you very much for any help

Cheers,

-- 
MBdC


Re: Problem with ns qualified attribute of a client message

Posted by Amila Suriarachchi <am...@gmail.com>.
How your value element looks like

<element name="value" type="xs:anyType/>

if so what you send is not according to the schema. Then I think there is
not proper solution

thanks,
Amila.


On Thu, Aug 27, 2009 at 1:37 PM, <er...@free.fr> wrote:

> No one ?
> ----- error3@free.fr a écrit :
>
> > >
> > > This is why the client should send the type. Server has said it is
> > > anyType so client has to send the type as the xsi type.
> > > As you have told your server does not process the runtime type,
> > then
> > > it may have assume it as string.
> > >
> > > thanks,
> > > Amila.
> >
> > Well, Amila,
> >
> > the server process the runtime time like this :
> > if it's string, the client send
> > <value><string>thestringvalue</string></value>
> > it it's dateTime, the client send
> > <value><datetime>thedatetime</datetime></value>
> >
> > There's no need of having fully qualified namespace.
> > What makes the server send me an error is that <string> is fully
> > qualified : <string xmlns:xi=http://....>
> > without this, it works (I've tried with SOAPUI)
> >
> > What do you think ? Any possibilities to remove these fully qualified
> > namespace attribute ?
> >
> > Cheers, and thanks again
> >
> > --
> > Martin
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Re: Problem with ns qualified attribute of a client message

Posted by er...@free.fr.
No one ?
----- error3@free.fr a écrit :

> > 
> > This is why the client should send the type. Server has said it is
> > anyType so client has to send the type as the xsi type.
> > As you have told your server does not process the runtime type,
> then
> > it may have assume it as string.
> > 
> > thanks,
> > Amila.
> 
> Well, Amila,
> 
> the server process the runtime time like this :
> if it's string, the client send
> <value><string>thestringvalue</string></value>
> it it's dateTime, the client send
> <value><datetime>thedatetime</datetime></value>
> 
> There's no need of having fully qualified namespace.
> What makes the server send me an error is that <string> is fully
> qualified : <string xmlns:xi=http://....>
> without this, it works (I've tried with SOAPUI)
> 
> What do you think ? Any possibilities to remove these fully qualified
> namespace attribute ?
> 
> Cheers, and thanks again
> 
> -- 
> Martin

Re: Problem with ns qualified attribute of a client message

Posted by er...@free.fr.
> 
> This is why the client should send the type. Server has said it is
> anyType so client has to send the type as the xsi type.
> As you have told your server does not process the runtime type, then
> it may have assume it as string.
> 
> thanks,
> Amila.

Well, Amila,

the server process the runtime time like this :
if it's string, the client send <value><string>thestringvalue</string></value>
it it's dateTime, the client send <value><datetime>thedatetime</datetime></value>

There's no need of having fully qualified namespace.
What makes the server send me an error is that <string> is fully qualified : <string xmlns:xi=http://....>
without this, it works (I've tried with SOAPUI)

What do you think ? Any possibilities to remove these fully qualified namespace attribute ?

Cheers, and thanks again

-- 
Martin

Re: Problem with ns qualified attribute of a client message

Posted by Amila Suriarachchi <am...@gmail.com>.
On Wed, Aug 26, 2009 at 11:48 AM, error3 <er...@free.fr> wrote:

> Le mercredi 26 août 2009 à 10:08 +0530, Amila Suriarachchi a écrit :
> >
> >
> > On Wed, Aug 26, 2009 at 12:48 AM, error3 <er...@free.fr> wrote:
> >         Le mardi 25 août 2009 à 07:23 +0200, error3 a écrit :
> >
> >         > Le lundi 24 août 2009 à 19:52 -0400, Martin Gainty a écrit :
> >         > > if your could convince the service provider to provide the
> >         wsdl and
> >         > > xsd schema we could get a working example for you
> >         >
> >         > Well, I think the wsdl and the xsd are the ones than could
> >         be download
> >         > there :
> >         > http://www.epcglobalinc.org/standards/epcis
> >
> >
> >
> >         Anyone for help ?
> >
> >
> >
> > it seems type for this element "value" has declared as xs:anyType in
> > the xsd. So ADB set the correct type to interpret at the server. If
> > you can change the wsdl so that its type to be xs:string I think it
> > should work.
>
> Thank you Amila, but this document
> (http://www.google.fr/url?sa=t&source=web&ct=res&cd=3&url=http%3A%2F%
> 2Fwww.epcglobalinc.org%2Fstandards%2Fepcis%
> 2Fepcis_1_0_1-standard-20070921.pdf&ei=0NCUSv6LLZPajQe4rZn0DQ&usg=AFQjCNF9XowoFXYlwQqS3NuqEulMhy4X3Q&sig2=8WdqQqK6wA-XTl1a5zs8Tw
> page 113) tells me that
> the type could be one of (xsd:string, xsd:integer, xsd:double,
> xsd:dateTime, xsd:string, epcisq:ArrayOfString, epcisq:VoidHolder)
>
> Do you see any way of making the wsdl works with the server without
> restraining the type only to string ?


This is why the client should send the type. Server has said it is anyType
so client has to send the type as the xsi type.
As you have told your server does not process the runtime type, then it may
have assume it as string.

thanks,
Amila.


>
>
> Cheers,
>
> --
> MBdC
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Re: Problem with ns qualified attribute of a client message

Posted by error3 <er...@free.fr>.
Le mercredi 26 août 2009 à 10:08 +0530, Amila Suriarachchi a écrit :
> 
> 
> On Wed, Aug 26, 2009 at 12:48 AM, error3 <er...@free.fr> wrote:
>         Le mardi 25 août 2009 à 07:23 +0200, error3 a écrit :
>         
>         > Le lundi 24 août 2009 à 19:52 -0400, Martin Gainty a écrit :
>         > > if your could convince the service provider to provide the
>         wsdl and
>         > > xsd schema we could get a working example for you
>         >
>         > Well, I think the wsdl and the xsd are the ones than could
>         be download
>         > there :
>         > http://www.epcglobalinc.org/standards/epcis
>         
>         
>         
>         Anyone for help ?
> 
>         
> 
> it seems type for this element "value" has declared as xs:anyType in
> the xsd. So ADB set the correct type to interpret at the server. If
> you can change the wsdl so that its type to be xs:string I think it
> should work.

Thank you Amila, but this document
(http://www.google.fr/url?sa=t&source=web&ct=res&cd=3&url=http%3A%2F%
2Fwww.epcglobalinc.org%2Fstandards%2Fepcis%
2Fepcis_1_0_1-standard-20070921.pdf&ei=0NCUSv6LLZPajQe4rZn0DQ&usg=AFQjCNF9XowoFXYlwQqS3NuqEulMhy4X3Q&sig2=8WdqQqK6wA-XTl1a5zs8Tw page 113) tells me that
the type could be one of (xsd:string, xsd:integer, xsd:double,
xsd:dateTime, xsd:string, epcisq:ArrayOfString, epcisq:VoidHolder) 

Do you see any way of making the wsdl works with the server without
restraining the type only to string ?

Cheers,

-- 
MBdC 


Re: Problem with ns qualified attribute of a client message

Posted by Amila Suriarachchi <am...@gmail.com>.
On Wed, Aug 26, 2009 at 12:48 AM, error3 <er...@free.fr> wrote:

> Le mardi 25 août 2009 à 07:23 +0200, error3 a écrit :
> > Le lundi 24 août 2009 à 19:52 -0400, Martin Gainty a écrit :
> > > if your could convince the service provider to provide the wsdl and
> > > xsd schema we could get a working example for you
> >
> > Well, I think the wsdl and the xsd are the ones than could be download
> > there :
> > http://www.epcglobalinc.org/standards/epcis
>
>
> Anyone for help ?


it seems type for this element "value" has declared as xs:anyType in the
xsd. So ADB set the correct type to interpret at the server. If you can
change the wsdl so that its type to be xs:string I think it should work.



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

RE: Problem with ns qualified attribute of a client message

Posted by error3 <er...@free.fr>.
Le mardi 25 août 2009 à 07:23 +0200, error3 a écrit :
> Le lundi 24 août 2009 à 19:52 -0400, Martin Gainty a écrit :
> > if your could convince the service provider to provide the wsdl and
> > xsd schema we could get a working example for you
> 
> Well, I think the wsdl and the xsd are the ones than could be download
> there :
> http://www.epcglobalinc.org/standards/epcis


Anyone for help ?


RE: Problem with ns qualified attribute of a client message

Posted by error3 <er...@free.fr>.
Le lundi 24 août 2009 à 19:52 -0400, Martin Gainty a écrit :
> if your could convince the service provider to provide the wsdl and
> xsd schema we could get a working example for you

Well, I think the wsdl and the xsd are the ones than could be download
there :
http://www.epcglobalinc.org/standards/epcis

-- 
MBdC


RE: Problem with ns qualified attribute of a client message

Posted by Martin Gainty <mg...@hotmail.com>.
if your could convince the service provider to provide the wsdl and xsd schema we could get a working example for you

Bon Chance
Martin Gainty 
______________________________________________ 
Note de déni et de confidentialité
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Subject: RE: Problem with ns qualified attribute  of a client message
> From: error3@free.fr
> To: axis-user@ws.apache.org
> Date: Tue, 25 Aug 2009 00:09:33 +0200
> 
> Le lundi 24 août 2009 à 18:03 -0400, Martin Gainty a écrit :
> > http://www.fosstrak.org/epcis/docs/user-guide.html
> 
> Thank you very much for the link Martin, I already knew that project,
> but I wanted to use axis2 for generate my own client (to learn how
> generate ws clients). My problem is a limitation of Axis2 ?
> 
> Of course if there's no way of tunning Axis2 to match my needs, I will
> use fosstrack.
> 
> Thanks again,
> 
> -- 
> MBdC
> 

_________________________________________________________________
With Windows Live, you can organize, edit, and share your photos.
http://www.windowslive.com/Desktop/PhotoGallery

RE: Problem with ns qualified attribute of a client message

Posted by error3 <er...@free.fr>.
Le lundi 24 août 2009 à 18:03 -0400, Martin Gainty a écrit :
> http://www.fosstrak.org/epcis/docs/user-guide.html

Thank you very much for the link Martin, I already knew that project,
but I wanted to use axis2 for generate my own client (to learn how
generate ws clients). My problem is a limitation of Axis2 ?

Of course if there's no way of tunning Axis2 to match my needs, I will
use fosstrack.

Thanks again,

-- 
MBdC


RE: Problem with ns qualified attribute of a client message

Posted by Martin Gainty <mg...@hotmail.com>.
http://www.fosstrak.org/epcis/docs/user-guide.html

Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Subject: Problem with ns qualified attribute  of a client message
> From: error3@free.fr
> To: axis-user@ws.apache.org
> Date: Mon, 24 Aug 2009 23:36:00 +0200
> 
> Hello,
> 
> I do have a problem with a axis2 generated webservice client.
> The webservice  I use is the standard one specified by EPCglobal (file a
> use to generate the client are on
> http://www.epcglobalinc.org/standards/epcis)
> 
> My problem is that the current code :
> 
> 		QueryParams params = new QueryParams();
> 		QueryParam p1 = new QueryParam();
> 		p1.setName("eventType");
> 		p1.setValue("ObjectEvent");
> 		params.addParam(p1);
> 		
> 		Poll polData = new Poll();
> 		polData.setQueryName("SimpleEventQuery");
> 		polData.setParams(params);
> 		
> 		PollE poll = new PollE();
> 		poll.setPoll(polData);
> 		
> 		
> 		EPCglobalEPCISServiceStub myStub = new EPCglobalEPCISServiceStub("http://localhost:8080/Test");
> 		
> 		myStub.poll(poll);
> 
> Generate a SOAP message like this :
> 
> <?xml version='1.0' encoding='utf-8'?>
> 	<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> 		<soapenv:Body>
> 			<ns5:Poll xmlns:ns5="urn:epcglobal:epcis-query:xsd:1">
> 				<queryName>SimpleEventQuery</queryName>
> 				<params><param><name>eventType</name>
> 				<value xmlns:s1="http://www.w3.org/2001/XMLSchema-instance" xmlns:s2="http://www.w3.org/2001/XMLSchema" s1:type="s2:string">ObjectEvent</value></param></params>
> 			</ns5:Poll>
> 		</soapenv:Body>
> </soapenv:Envelope>
> 
> My problem is the server. I don't have access to the code on it
> (proprietary solution :-/). And it does not work as it does not want
> fully qualified type attribute like the ones in <value> tag. It's
> waiting for 
> <value>ObjectEvent</value>
> instead of :
> <value xmlns:s1="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:s2="http://www.w3.org/2001/XMLSchema"
> s1:type="s2:string">ObjectEvent</value>
> 
> any tips to get rid of this attributes ?
> 
> Thank you very much for any help
> 
> Cheers,
> 
> -- 
> MBdC
> 

_________________________________________________________________
With Windows Live, you can organize, edit, and share your photos.
http://www.windowslive.com/Desktop/PhotoGallery