Discussion:
How to create a web service client for rpc/enc
rev
2008-08-16 13:38:12 UTC
Permalink
Hi,

I'm using NetBeans IDE 6.1
Installed plugins:
- JAX-RPC Web Services 0.2
- Web Services 1.1.2

I want to create an application that acts as a SOAP client for a JIRA
application.
WSDL URL: http://jira.atlassian.com/rpc/soap/jirasoapservice-v2

Having seen how easy it is to create a SOAP client for a modern doc/literal
app, using NetBeans and JAX-WS to get drag-and-drop methods in your code, I
tried to start a SOAP client for JIRA.
I've tried several configurations, searched internet (and found out the
problems are due to the fact that JIRA uses rpc/enc style), but still can't
get things working.

If it's possible to create a SOAP client (without complete manual coding) in
NetBeans 6.1 for the above WSDL, can someone please tell me which steps to
follow?

tx!
Rev
--
View this message in context: http://www.nabble.com/How-to-create-a-web-service-client-for-rpc-enc-http%3A--jira.atlassian.com-rpc-soap-jirasoapservice-v2-tp19011524p19011524.html
Sent from the Netbeans - Users mailing list archive at Nabble.com.
Lukas Jungmann
2008-08-18 15:56:44 UTC
Permalink
Hi,
Post by rev
Hi,
I'm using NetBeans IDE 6.1
- JAX-RPC Web Services 0.2
- Web Services 1.1.2
I want to create an application that acts as a SOAP client for a JIRA
application.
WSDL URL: http://jira.atlassian.com/rpc/soap/jirasoapservice-v2
Having seen how easy it is to create a SOAP client for a modern doc/literal
app, using NetBeans and JAX-WS to get drag-and-drop methods in your code, I
tried to start a SOAP client for JIRA.
I've tried several configurations, searched internet (and found out the
problems are due to the fact that JIRA uses rpc/enc style), but still can't
get things working.
JAX-WS does not support rpc/enc web services directly but you can use
Dispatch client instead, see an example which shows how to call rpc/enc
based Google ws from JAX-WS at
http://weblogs.java.net/blog/jitu/archive/2006/01/accessing_googl_1.html
Another option is to use JAX-RPC

--lj
Post by rev
If it's possible to create a SOAP client (without complete manual coding) in
NetBeans 6.1 for the above WSDL, can someone please tell me which steps to
follow?
tx!
Rev
rev
2008-08-22 19:11:48 UTC
Permalink
Hi Lukas,
Post by Lukas Jungmann
JAX-WS does not support rpc/enc web services directly but you can use
Dispatch client instead, see an example which shows how to call rpc/enc
based Google ws from JAX-WS at
http://weblogs.java.net/blog/jitu/archive/2006/01/accessing_googl_1.html
I looked at the GoogleSearch example.
At this moment I don't want to become a SOAP or RPC expert, just get my app
working...
The dispatch example is more complicated than I'd like to handle right
now...
Post by Lukas Jungmann
Another option is to use JAX-RPC
I did look at that the moment I found out that Atlassian uses rpc/enc.
I installed the JAX-RPC plugin in NetBeans.
When I add a Web Service Client it results in "WsCompile script failed
during initial client generation":

init:
wscompile-init:
Created dir: C:\netbeans\SoapRpc\build\classes
Created dir: C:\netbeans\SoapRpc\build\generated\wsclient
Created dir: C:\netbeans\SoapRpc\build\generated\wsbinary
jirasoapservice-v2-client-wscompile:
Copying 1 file to C:\netbeans\SoapRpc\build\generated\wsclient\wsdl
warning: Processing WS-I non conforming operation "getComment" with
RPC-Style and SOAP-encoded
warning: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not
allowed in doc/lit or rpc/lit for soapbind:fault: "RemoteException"
warning: Processing WS-I non conforming operation "createGroup" with
RPC-Style and SOAP-encoded
warning: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not
allowed in doc/lit or rpc/lit for soapbind:fault:
"RemoteValidationException"
warning: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not
allowed in doc/lit or rpc/lit for soapbind:fault:
"RemotePermissionException"
warning: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not
allowed in doc/lit or rpc/lit for soapbind:fault:
"RemoteAuthenticationException"
warning: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not
allowed in doc/lit or rpc/lit for soapbind:fault: "RemoteException"
warning: Processing WS-I non conforming operation "getServerInfo" with
RPC-Style and SOAP-encoded
warning: Processing WS-I non conforming operation "getGroup" with RPC-Style
and SOAP-encoded
<snip...>
C:\netbeans\SoapRpc\build\generated\wsclient\soaprpc\JiraSoapService_createGroup_Fault_SOAPSerializer.java:22:
ns1_fault_QNAME is already defined in
soaprpc.JiraSoapService_createGroup_Fault_SOAPSerializer
private static final javax.xml.namespace.QName ns1_fault_QNAME = new
QName("http://jira.atlassian.com/rpc/soap/jirasoapservice-v2", "fault");
C:\netbeans\SoapRpc\build\generated\wsclient\soaprpc\JiraSoapService_createGroup_Fault_SOAPSerializer.java:26:
ns1_fault_QNAME is already defined in
soaprpc.JiraSoapService_createGroup_Fault_SOAPSerializer
private static final javax.xml.namespace.QName ns1_fault_QNAME = new
QName("http://jira.atlassian.com/rpc/soap/jirasoapservice-v2", "fault");
C:\netbeans\SoapRpc\build\generated\wsclient\soaprpc\JiraSoapService_createGroup_Fault_SOAPSerializer.java:30:
ns1_fault_QNAME is already defined in
soaprpc.JiraSoapService_createGroup_Fault_SOAPSerializer
private static final javax.xml.namespace.QName ns1_fault_QNAME = new
QName("http://jira.atlassian.com/rpc/soap/jirasoapservice-v2", "fault");
<snip...>
C:\netbeans\SoapRpc\build\generated\wsclient\soaprpc\JiraSoapService_deletePermissionScheme_Fault_SOAPSerializer.java:30:
ns1_fault_QNAME is already defined in
soaprpc.JiraSoapService_deletePermissionScheme_Fault_SOAPSerializer
private static final javax.xml.namespace.QName ns1_fault_QNAME = new
QName("http://jira.atlassian.com/rpc/soap/jirasoapservice-v2", "fault");
C:\netbeans\SoapRpc\build\generated\wsclient\soaprpc\JiraSoapService_addPermissionTo_Fault_SOAPSerializer.java:22:
ns1_fault_QNAME is already defined in
soaprpc.JiraSoapService_addPermissionTo_Fault_SOAPSerializer
private static final javax.xml.namespace.QName ns1_fault_QNAME = new
QName("http://jira.atlassian.com/rpc/soap/jirasoapservice-v2", "fault");
100 errors
error: compilation failed, errors should have been reported
Command invoked: wscompile C:\Java\jdk1.6.0_06\jre\bin\java.exe -classpath
"C:\Java\jdk1.6.0_06\lib\tools.jar;C:\Documents and
Settings\rev\.netbeans\6.5beta\modules\ext\jaxrpc16\activation.jar;C:\Documents
and
Settings\rev\.netbeans\6.5beta\modules\ext\jaxrpc16\FastInfoset.jar;C:\Documents
and
Settings\rev\.netbeans\6.5beta\modules\ext\jaxrpc16\jaxp-api.jar;C:\Documents
and
Settings\rev\.netbeans\6.5beta\modules\ext\jaxrpc16\jax-qname.jar;C:\Documents
and
Settings\rev\.netbeans\6.5beta\modules\ext\jaxrpc16\jaxrpc-api.jar;C:\Documents
and
Settings\rev\.netbeans\6.5beta\modules\ext\jaxrpc16\jaxrpc-impl.jar;C:\Documents
and
Settings\rev\.netbeans\6.5beta\modules\ext\jaxrpc16\jaxrpc-spi.jar;C:\Documents
and
Settings\rev\.netbeans\6.5beta\modules\ext\jaxrpc16\jsr173_api.jar;C:\Documents
and
Settings\rev\.netbeans\6.5beta\modules\ext\jaxrpc16\mail.jar;C:\Documents
and
Settings\rev\.netbeans\6.5beta\modules\ext\jaxrpc16\relaxngDatatype.jar;C:\Documents
and
Settings\rev\.netbeans\6.5beta\modules\ext\jaxrpc16\saaj-api.jar;C:\Documents
and
Settings\rev\.netbeans\6.5beta\modules\ext\jaxrpc16\saaj-impl.jar;C:\Documents
and Settings\rev\.netbeans\6.5beta\modules\ext\jaxrpc16\xsdlib.jar"
com.sun.xml.rpc.tools.wscompile.Main -d
C:\netbeans\SoapRpc\build\generated\wsbinary
-features:searchschema,wsi,rpcliteral -gen:client
-httpproxy:${wscompile.client.jirasoapservice-v2.proxy} -keep -mapping
C:\netbeans\SoapRpc\build\generated\wsclient\wsdl\jirasoapservice-v2-mapping.xml
-s C:\netbeans\SoapRpc\build\generated\wsclient
C:\netbeans\SoapRpc\build\generated\wsclient\wsdl\jirasoapservice-v2-config.xml
C:\netbeans\SoapRpc\nbproject\build-impl.xml:335: wscompile failed
BUILD FAILED (total time: 5 seconds)


Cheers,
rev
--
View this message in context: http://www.nabble.com/How-to-create-a-web-service-client-for-rpc-enc-http%3A--jira.atlassian.com-rpc-soap-jirasoapservice-v2-tp19011524p19113823.html
Sent from the Netbeans - Users mailing list archive at Nabble.com.
m_tzou@yahoo
2009-03-09 08:21:37 UTC
Permalink
Hello , i am having the same problem when i have choosen JAX-RPC and i
cannot seem to be able to solve it... Any ideas??

Thanks in advance..
--
View this message in context: http://www.nabble.com/How-to-create-a-web-service-client-for-rpc-enc-http%3A--jira.atlassian.com-rpc-soap-jirasoapservice-v2-tp19011524p22408789.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Petr Blaha
2009-03-09 09:07:16 UTC
Permalink
Hi,

I had similar issue and should use Apache XML-RPC implementation that is
available here

http://ws.apache.org/xmlrpc/index.html


See sample

http://confluence.atlassian.com/display/JIRA/Creating+a+XML-RPC+Client

Petr
Post by ***@yahoo
Hello , i am having the same problem when i have choosen JAX-RPC and i
cannot seem to be able to solve it... Any ideas??
Thanks in advance..
m_tzou@yahoo
2009-03-10 06:48:11 UTC
Permalink
Hello again..

Thanks for the immediate answer...
My problem seems to be in the creation of the netbeans WebServiceClient
where i have the same problems as mentioned in the post above...
Is there some known problem with NetBeans 6.1 and JIRA wsdl..
The Jira wsdl through JBuilder had no problem but with NetBeans i cannot
solve...

Thanks in advance..

Maria
Post by Petr Blaha
Hi,
I had similar issue and should use Apache XML-RPC implementation that is
available here
http://ws.apache.org/xmlrpc/index.html
See sample
http://confluence.atlassian.com/display/JIRA/Creating+a+XML-RPC+Client
Petr
Post by ***@yahoo
Hello , i am having the same problem when i have choosen JAX-RPC and i
cannot seem to be able to solve it... Any ideas??
Thanks in advance..
--
View this message in context: http://www.nabble.com/How-to-create-a-web-service-client-for-rpc-enc-http%3A--jira.atlassian.com-rpc-soap-jirasoapservice-v2-tp19011524p22428914.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Xavier Callejas
2009-03-10 04:19:39 UTC
Permalink
Post by ***@yahoo
Hello , i am having the same problem when i have choosen JAX-RPC and i
cannot seem to be able to solve it... Any ideas??
Thanks in advance..
Hi,

As Petr Blaha said, I couldn't use Netbeans wizard or RCP compat. for web
services generated by apache RPC API, I recommend you to try AXIS from
Apache.

rgds.

Loading...