You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@juddi.apache.org by Mathieu Vézeau <mv...@licef.teluq.uquebec.ca> on 2003/10/27 13:47:18 UTC

[juddi-Users] Using JAX-RPC to access jUDDI

Hi everyone,

I am trying to access jUDDI through JAX-RPC, but I have some
problems doing so. My working environment is the following:

Server-side:
- Tomcat 5.0
- jUDDI 0.8.0 (w/ embedded Axis)
- MySQL 4.0

Client-side
- J2SDK 1.4.2_01
- Sun's JAX-RPC implementation (from Sun's JWSDP 1.2)

I have three questions:

1) Why doesn't the WDSL's for jUDDI include a <Service> element
defining the endpoint for the service? The JAX-RPC tools for
generating stubs (both Axis and Sun implementations) require
this in the WSDL. I can add them manually in the WSDL, but
what is the rationale behind not having them in the first place
(with some default enpoint)?

2) JAX-RPC defines three invocation methods (static stubs,
dynamic proxies, DII), and I wish to use a specific one:
statically generated stubs. I generate my stubs using Sun's
'wscompile' tool against jUDDI's (modified, see above) WSDL
file. However, the generated Java-XML serializers are coded
so that they send each element using the UDDI namespace
and qualifiers (notice the qualified elements of the form
'ns0:XXX'):

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns0="urn:uddi-org:api_v2">
	<env:Body>
		<ns0:save_business generic="2.0">
			<ns0:authInfo>authToken:6F152440-08BC-11D8-A8C0-AAB6CC2C14BD</ns0:authInfo>
			<ns0:businessEntity businessKey="">
				<ns0:name>test</ns0:name>
			</ns0:businessEntity>
		</ns0:save_business>
	</env:Body>
</env:Envelope>

However, I checked the jUDDI code and the server expects the
elements under the first SOAP Body child to be UNQUALIFIED.
That is, in the request above the 'ns0:authInfo' should be
simply 'authInfo', etc. (the first child of the body,
'ns0:save_business' is ok, since it's not unmarshalled by
the same piece of code)

So, given this mismatch, how can I make things work?

3) Does anyone have any other recommendations to give for
properly using JAX-RPC with jUDDI?

Any input would be greatly appreciated.

--
Mathieu Vézeau
Développeur logiciel / Software Developer
Centre de recherche LICEF
4750 Henri-Julien, Bureau 100
Montréal (QC), Canada H2T 3E4
T: (514) 843-2015 #2321
F: (514) 843-2160
www.licef.teluq.uquebec.ca




RE: [juddi-Users] Using JAX-RPC to access jUDDI

Posted by Steve Viens <st...@viens.net>.
Also, if you don't mind, would you sumbit a bug to jUDDI's bug DB?

 http://sourceforge.net/tracker/?group_id=42875&atid=434422

Steve

-----Original Message-----
From: juddi-users-admin@lists.sourceforge.net
[mailto:juddi-users-admin@lists.sourceforge.net] On Behalf Of Mathieu
Vézeau
Sent: Monday, October 27, 2003 3:46 PM
To: juddi-users@lists.sourceforge.net
Subject: [juddi-Users] Using JAX-RPC to access jUDDI


Hi everyone,

I am trying to access jUDDI through JAX-RPC, but I have some problems
doing so. My working environment is the following:

Server-side:
- Tomcat 5.0
- jUDDI 0.8.0 (w/ embedded Axis)
- MySQL 4.0

Client-side
- J2SDK 1.4.2_01
- Sun's JAX-RPC implementation (from Sun's JWSDP 1.2)

I have three questions:

1) Why doesn't the WDSL's for jUDDI include a <Service> element defining
the endpoint for the service? The JAX-RPC tools for generating stubs
(both Axis and Sun implementations) require this in the WSDL. I can add
them manually in the WSDL, but what is the rationale behind not having
them in the first place (with some default enpoint)?

2) JAX-RPC defines three invocation methods (static stubs, dynamic
proxies, DII), and I wish to use a specific one: statically generated
stubs. I generate my stubs using Sun's 'wscompile' tool against jUDDI's
(modified, see above) WSDL file. However, the generated Java-XML
serializers are coded so that they send each element using the UDDI
namespace and qualifiers (notice the qualified elements of the form
'ns0:XXX'):

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"xmlns:xsd="http://w
ww.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns0="urn:uddi-org:api_v2">
	<env:Body>
		<ns0:save_business generic="2.0">
	
<ns0:authInfo>authToken:6F152440-08BC-11D8-A8C0-AAB6CC2C14BD</ns0:authIn
fo>
			<ns0:businessEntity businessKey="">
				<ns0:name>test</ns0:name>
			</ns0:businessEntity>
		</ns0:save_business>
	</env:Body>
</env:Envelope>

However, I checked the jUDDI code and the server expects the elements
under the first SOAP Body child to be UNQUALIFIED. That is, in the
request above the 'ns0:authInfo' should be simply 'authInfo', etc. (the
first child of the body, 'ns0:save_business' is ok, since it's not
unmarshalled by the same piece of code)

So, given this mismatch, how can I make things work?

3) Does anyone have any other recommendations to give for properly using
JAX-RPC with jUDDI?

Any input would be greatly appreciated.

--
Mathieu Vézeau
Développeur logiciel / Software Developer
Centre de recherche LICEF
4750 Henri-Julien, Bureau 100
Montréal (QC), Canada H2T 3E4
T: (514) 843-2015 #2321
F: (514) 843-2160
www.licef.teluq.uquebec.ca



-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program. Do you
like what SourceForge.net is doing for the Open Source Community?  Make
a contribution, and help us add new features and functionality. Click
here: http://sourceforge.net/donate/
_______________________________________________
juddi-users mailing list
juddi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/juddi-users







RE: [juddi-Users] Using JAX-RPC to access jUDDI

Posted by Mathieu Vézeau <mv...@licef.teluq.uquebec.ca>.
Yes, that's exactly what I did and it works just fine (i.e. using getLocalName()
instead of getNodeName()). I just wasn't sure if that should be considered a bug
or not. I will file a bug report about it.

Oh and by the way people, don't do like me and use JAX-RPC to access jUDDI,
unless you need to or want to learn stuff. Just use UDDI4J, it's like 5 times
faster and easier.

--
Mathieu Vézeau
Développeur logiciel / Software Developer
Centre de recherche LICEF
4750 Henri-Julien, Bureau 100
Montréal (QC), Canada H2T 3E4
T: (514) 843-2015 #2321
F: (514) 843-2160
www.licef.teluq.uquebec.ca


-----Original Message-----
From: juddi-users-admin@lists.sourceforge.net
[mailto:juddi-users-admin@lists.sourceforge.net]On Behalf Of Steve Viens
Sent: Monday, October 27, 2003 10:18 PM
To: juddi-users@lists.sourceforge.net
Subject: RE: [juddi-Users] Using JAX-RPC to access jUDDI


I believe I see the problem ... Here's a possible fix. Change the
following line from the method getChildElementsByTagName in XMLUtils
from:

      if (node.getNodeType() == Node.ELEMENT_NODE &&
node.getNodeName().equals(tagName))
        result.addElement(node); // matching element

  -to-

      if (node.getNodeType() == Node.ELEMENT_NODE &&
node.getLocalName().equals(tagName))
        result.addElement(node); // matching element

(getNodeName was changed to getLocalName)

Steve

-----Original Message-----
From: juddi-users-admin@lists.sourceforge.net
[mailto:juddi-users-admin@lists.sourceforge.net] On Behalf Of Mathieu
Vézeau
Sent: Monday, October 27, 2003 3:46 PM
To: juddi-users@lists.sourceforge.net
Subject: [juddi-Users] Using JAX-RPC to access jUDDI


Hi everyone,

I am trying to access jUDDI through JAX-RPC, but I have some problems
doing so. My working environment is the following:

Server-side:
- Tomcat 5.0
- jUDDI 0.8.0 (w/ embedded Axis)
- MySQL 4.0

Client-side
- J2SDK 1.4.2_01
- Sun's JAX-RPC implementation (from Sun's JWSDP 1.2)

I have three questions:

1) Why doesn't the WDSL's for jUDDI include a <Service> element defining
the endpoint for the service? The JAX-RPC tools for generating stubs
(both Axis and Sun implementations) require this in the WSDL. I can add
them manually in the WSDL, but what is the rationale behind not having
them in the first place (with some default enpoint)?

2) JAX-RPC defines three invocation methods (static stubs, dynamic
proxies, DII), and I wish to use a specific one: statically generated
stubs. I generate my stubs using Sun's 'wscompile' tool against jUDDI's
(modified, see above) WSDL file. However, the generated Java-XML
serializers are coded so that they send each element using the UDDI
namespace and qualifiers (notice the qualified elements of the form
'ns0:XXX'):

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"xmlns:xsd="http://w
ww.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns0="urn:uddi-org:api_v2">
	<env:Body>
		<ns0:save_business generic="2.0">

<ns0:authInfo>authToken:6F152440-08BC-11D8-A8C0-AAB6CC2C14BD</ns0:authIn
fo>
			<ns0:businessEntity businessKey="">
				<ns0:name>test</ns0:name>
			</ns0:businessEntity>
		</ns0:save_business>
	</env:Body>
</env:Envelope>

However, I checked the jUDDI code and the server expects the elements
under the first SOAP Body child to be UNQUALIFIED. That is, in the
request above the 'ns0:authInfo' should be simply 'authInfo', etc. (the
first child of the body, 'ns0:save_business' is ok, since it's not
unmarshalled by the same piece of code)

So, given this mismatch, how can I make things work?

3) Does anyone have any other recommendations to give for properly using
JAX-RPC with jUDDI?

Any input would be greatly appreciated.

--
Mathieu Vézeau
Développeur logiciel / Software Developer
Centre de recherche LICEF
4750 Henri-Julien, Bureau 100
Montréal (QC), Canada H2T 3E4
T: (514) 843-2015 #2321
F: (514) 843-2160
www.licef.teluq.uquebec.ca



-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program. Do you
like what SourceForge.net is doing for the Open Source Community?  Make
a contribution, and help us add new features and functionality. Click
here: http://sourceforge.net/donate/
_______________________________________________
juddi-users mailing list
juddi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/juddi-users






-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
juddi-users mailing list
juddi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/juddi-users





RE: [juddi-Users] Using JAX-RPC to access jUDDI

Posted by Steve Viens <st...@viens.net>.
I believe I see the problem ... Here's a possible fix. Change the
following line from the method getChildElementsByTagName in XMLUtils
from:

      if (node.getNodeType() == Node.ELEMENT_NODE &&
node.getNodeName().equals(tagName))
        result.addElement(node); // matching element

  -to-

      if (node.getNodeType() == Node.ELEMENT_NODE &&
node.getLocalName().equals(tagName))
        result.addElement(node); // matching element

(getNodeName was changed to getLocalName)

Steve

-----Original Message-----
From: juddi-users-admin@lists.sourceforge.net
[mailto:juddi-users-admin@lists.sourceforge.net] On Behalf Of Mathieu
Vézeau
Sent: Monday, October 27, 2003 3:46 PM
To: juddi-users@lists.sourceforge.net
Subject: [juddi-Users] Using JAX-RPC to access jUDDI


Hi everyone,

I am trying to access jUDDI through JAX-RPC, but I have some problems
doing so. My working environment is the following:

Server-side:
- Tomcat 5.0
- jUDDI 0.8.0 (w/ embedded Axis)
- MySQL 4.0

Client-side
- J2SDK 1.4.2_01
- Sun's JAX-RPC implementation (from Sun's JWSDP 1.2)

I have three questions:

1) Why doesn't the WDSL's for jUDDI include a <Service> element defining
the endpoint for the service? The JAX-RPC tools for generating stubs
(both Axis and Sun implementations) require this in the WSDL. I can add
them manually in the WSDL, but what is the rationale behind not having
them in the first place (with some default enpoint)?

2) JAX-RPC defines three invocation methods (static stubs, dynamic
proxies, DII), and I wish to use a specific one: statically generated
stubs. I generate my stubs using Sun's 'wscompile' tool against jUDDI's
(modified, see above) WSDL file. However, the generated Java-XML
serializers are coded so that they send each element using the UDDI
namespace and qualifiers (notice the qualified elements of the form
'ns0:XXX'):

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"xmlns:xsd="http://w
ww.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns0="urn:uddi-org:api_v2">
	<env:Body>
		<ns0:save_business generic="2.0">
	
<ns0:authInfo>authToken:6F152440-08BC-11D8-A8C0-AAB6CC2C14BD</ns0:authIn
fo>
			<ns0:businessEntity businessKey="">
				<ns0:name>test</ns0:name>
			</ns0:businessEntity>
		</ns0:save_business>
	</env:Body>
</env:Envelope>

However, I checked the jUDDI code and the server expects the elements
under the first SOAP Body child to be UNQUALIFIED. That is, in the
request above the 'ns0:authInfo' should be simply 'authInfo', etc. (the
first child of the body, 'ns0:save_business' is ok, since it's not
unmarshalled by the same piece of code)

So, given this mismatch, how can I make things work?

3) Does anyone have any other recommendations to give for properly using
JAX-RPC with jUDDI?

Any input would be greatly appreciated.

--
Mathieu Vézeau
Développeur logiciel / Software Developer
Centre de recherche LICEF
4750 Henri-Julien, Bureau 100
Montréal (QC), Canada H2T 3E4
T: (514) 843-2015 #2321
F: (514) 843-2160
www.licef.teluq.uquebec.ca



-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program. Do you
like what SourceForge.net is doing for the Open Source Community?  Make
a contribution, and help us add new features and functionality. Click
here: http://sourceforge.net/donate/
_______________________________________________
juddi-users mailing list
juddi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/juddi-users