Title: Anyone have a Java example of consuming Remedy Web Services
**
 
From the stack below it doesn't look your developer is using Axis, so my comments may not be relevant.
 
However, I noticed in his request that everything is in the header, not in the body.  So perhaps this will make a difference -
 
My recent experience using web services from Java with Axis 1.4 seemed to indicate that Remedy was incompatible with the default web service client stubs generated by Axis (using wsdl2java).  I had to make two manual modifications for the following issues:
 
- Request side: The client stubs contain code that constructs ParameterDesc objects for each parameter to the web service method.  One of the construct params is whether this parameter should be sent in the header or the body.  Axis generated these as "true", meaning send them in header - but Remedy complained that required elements were missing.  After I manually edited each generated file and changed all of them to false, it worked.  It seems Remedy only looks for method parameters in the body.
- Response side:  Similar issue - Remedy sent all response values in the body, but the Axis client stubs were looking for them in the header only.  This wasn't as easy to fix; I special cased a fix for the one return value I was interested in.
 
I would have expected the Axis client stubs to work without modification, as they were generated from the wsdl.  I didn't see any option in wsdl2java that controls anything with respect to header/body usage for parameters.  I don't know the root cause - but fwiw I was able to get it working with the above changes.
Dan


From: Action Request System discussion list(ARSList) on behalf of Deborah J Brown
Sent: Thu 8/10/2006 5:52 AM
To: [email protected]
Subject: Anyone have a Java example of consuming Remedy Web Services

We are trying to implement an interface to our Remedy systems through web
services.  A non-Remedy Java application is attemting to consume a web
service that we have published.  We can successfully consume our web
service from Remedy via another form (ie. we have published and consumed
said web service all internally in Remedy) but the outside app is getting
errors.  Since I don't know Java I can't be of any help to them.  There are
plenty of Perl examples available, but... If anyone on the list can see
what the error is or can just send me a Java example of successfully
consuming a Remedy published web service I would be grateful.

Here is the error that the developer of the other app sent me:

run:
     [java] Peter
     [java] <!-------------------- REQUEST ---------------->
     [java] URL        :  http://remedy-
dev.ntrs.com/arsys/services/ARService?se
rver=chi-rmy-d02&webService=DOUG_TEST
     [java] Headers    :
     [java]   SOAPAction: ["urn:DOUG_TEST/OpGet"]
     [java]   Content-Type: [text/xml]

     [java] <env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.o
rg/2001/XMLSchema"><env:Header><wsse:Security
xmlns:wsse="http://schemas.xmlsoap
.org/ws/2002/07/secext"><wsse:UsernameToken><wsse:Username>idmtest</wsse:Use
rnam
e><wsse:Password>remedy</wsse:Password></wsse:UsernameToken></wsse:Security>
</en
v:Header><env:Body/></env:Envelope>
     [java] <!-------------------- END REQUEST ------------>
     [java] <!-------------------- RESPONSE --------------->
     [java] URL           : http://remedy-
dev.ntrs.com/arsys/services/ARService?
server=chi-rmy-d02&webService=DOUG_TEST
     [java] Response Code :500
     [java] Headers       :
     [java]   Connection=close
     [java]   Date=Fri, 21 Jul 2006 21:40:38 GMT
     [java]   Server=Microsoft-IIS/6.0
     [java]   X-Powered-By=ServletExec/5.0p06, Servlet/2.4, JSP/2.0
     [java]   Content-Type=text/xml; charset=utf-8
     [java] Envelope   :
     [java] <?xml version="1.0" encoding="UTF-8"?>
     [java] <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/env
elope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.or
g/2001/XMLSchema-instance">
     [java]  <soapenv:Body>
     [java]   <soapenv:Fault>
     [java]    <faultcode>soapenv:Server.userException</faultcode>
     [java]    <faultstring>java.lang.NullPointerException</faultstring>
     [java]    <detail/>
     [java]   </soapenv:Fault>
     [java]  </soapenv:Body>
     [java] </soapenv:Envelope>
     [java] <!-------------------- END RESPONSE ----------->
     [java] java.rmi.RemoteException: SOAP
Fault:javax.xml.rpc.soap.SOAPFaultExc
eption: java.lang.NullPointerException
     [java] Detail:
     [java] <detail>
     [java] </detail>; nested exception is:
     [java]     javax.xml.rpc.soap.SOAPFaultException:
java.lang.NullPointerExce
ption
     [java]     at
com.ntrs.idm.wlservice.wlclientstatic.DOUG_TESTPortType_Stub.
opGet(DOUG_TESTPortType_Stub.java:31)
     [java]     at com.ntrs.idm.wlservice.wlclientstatic.RemedyClient.doIt
(Remed
yClient.java:48)
     [java]     at com.ntrs.idm.wlservice.wlclientstatic.RemedyClient.main
(Remed
yClient.java:18)
     [java] Caused by: javax.xml.rpc.soap.SOAPFaultException:
java.lang.NullPoin
terException
     [java]     at weblogic.webservice.core.ClientDispatcher.receive
(ClientDispa
tcher.java:313)
     [java]     at weblogic.webservice.core.ClientDispatcher.dispatch
(ClientDisp
atcher.java:144)
     [java]     at weblogic.webservice.core.DefaultOperation.invoke
(DefaultOpera
tion.java:457)
     [java]     at weblogic.webservice.core.DefaultOperation.invoke
(DefaultOpera
tion.java:443)
     [java]     at weblogic.webservice.core.rpc.StubImpl._invoke
(StubImpl.java:2
90)
     [java]     at
com.ntrs.idm.wlservice.wlclientstatic.DOUG_TESTPortType_Stub.
opGet(DOUG_TESTPortType_Stub.java:26)

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org

__20060125_______________________This posting was submitted with HTML in it___

Reply via email to