Re: Java Axis 1.4 parse null values in int field (solved)

2010-05-17 Thread Grape Peter
I reply to my own question so someone in the future knows what to do...

Check the XSI check box in the webservice definition in remedy and set all 
fields that can return a nil/empty/not mapped value of any kind to nillable and 
the deserialization will work much better. :-)

Axis requires XSI definitions to work properly.

Also set all parameters options in the generated stub to false as Axis 
wsdl2java function does not recognize that the alla function parameters must 
reside in the body of the soap request instead of the header.




_
Peter Grape
Websphere portal  content developer

SCANIA Infomate AB

Phone: +46-8-553 859 12
E-mail:peter.gr...@scania.commailto:peter.gr...@scania.com

-Original Message-
From: Grape Peter
Sent: den 28 april 2010 08:42
To: 'arslist@ARSLIST.ORG'
Subject: Java Axis 1.4 parse null values in int field


Hi All,

Does anybody know how to deserialize a int field which recieves a null value 
from Remedy 7.1

The Axis 1.4 default beandeserializer is unable to parse the data if a null 
value comes in a int field from remedy.


_
Peter Grape
Websphere portal  content developer

SCANIA Infomate AB
SAIL, SSP  PUM Technical support and development
SAIL: https://sail.scania.comhttps://sail.scania.com/
SSP:  https://supplier.scania.com/ 
https://supplier.scania.comhttps://supplier.scania.com/
PUM: https://supplier.scania.com/ 
https://pum.scania.comhttps://pum.scania.com/

Phone: +46-8-553 859 12
E-mail:peter.gr...@scania.commailto:peter.gr...@scania.com


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug10 www.wwrug.com ARSlist: Where the Answers Are


Java Axis 1.4 parse null values in int field

2010-04-28 Thread Grape Peter
Hi All,

Does anybody know how to deserialize a int field which recieves a null value 
from Remedy 7.1

The Axis 1.4 default beandeserializer is unable to parse the data if a null 
value comes in a int field from remedy.


_
Peter Grape
Websphere portal  content developer

SCANIA Infomate AB
SAIL, SSP  PUM Technical support and development
SAIL: https://sail.scania.comhttps://sail.scania.com/
SSP:  https://supplier.scania.com/ 
https://supplier.scania.comhttps://supplier.scania.com/
PUM: https://supplier.scania.com/ 
https://pum.scania.comhttps://pum.scania.com/

Phone: +46-8-553 859 12
E-mail:peter.gr...@scania.commailto:peter.gr...@scania.com


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug10 www.wwrug.com ARSlist: Where the Answers Are


Pointer to Axis 1.4 working client code example

2010-04-23 Thread Grape Peter
Hi All,

I am new to Remedy and need a pointer to some working Axis Client code that 
properly authenticates a user against a Remedy Webservice
I am getting the dreaded Server.userException all the times.

It seems like the wsdl2java ant task is not being able to parse the wsdl 
properly that ARS is generating, we are using version 7.1

I am not able to change the namespace of the envelope to correct namespace

RequestXML:
?xml version=1.0 encoding=UTF-8?
soapenv:Envelope
  xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
  xmlns:xsd=http://www.w3.org/2001/XMLSchema; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  soapenv:Header
ns1:urn soapenv:actor=http://schemas.xmlsoap.org/soap/actor/next;
  soapenv:mustUnderstand=0 xmlns:ns1=urn:AuthenticationInfo
  ns2:userName xmlns:ns2=urn:AC_Case_Handlinguser/ns2:userName
  ns3:password xmlns:ns3=urn:AC_Case_Handlingpwd/ns3:password
  ns4:authentication xmlns:ns4=urn:AC_Case_Handling/
  ns5:locale xmlns:ns5=urn:AC_Case_Handling/
  ns6:timeZone xmlns:ns6=urn:AC_Case_Handling/
/ns1:urn
  /soapenv:Header
  soapenv:Body
list_workshop_open_case xmlns=urn:AC_Case_Handling
  startRecord0/startRecord
  maxLimit100/maxLimit
  Countryse/Country
  Dealer_id40309/Dealer_id
  from_date xsi:type=xsd:dateTime2010-04-23T14:47:16.297Z/from_date
  to_date xsi:type=xsd:dateTime2010-04-23T14:47:16.297Z/to_date
/list_workshop_open_case
  /soapenv:Body
/soapenv:Envelope

ResponseXML:?xml version=1.0 encoding=UTF-8?
soapenv:Envelope
  xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
  xmlns:xsd=http://www.w3.org/2001/XMLSchema; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  soapenv:Body
soapenv:Fault
  faultcodesoapenv:Server.userException/faultcode
  faultstringjava.lang.NullPointerException/faultstring
  detail
ns1:hostname 
xmlns:ns1=http://xml.apache.org/axis/;SESOCO0396/ns1:hostnamehttp://xml.apache.org/axis/
  /detail
/soapenv:Fault
  /soapenv:Body
/soapenv:Envelope

Axis Error:Server.userException
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.lang.NullPointerException
 faultActor:
 faultNode:
 faultDetail:
 {http://xml.apache.org/axis/}hostname:SESOCO0396

java.lang.NullPointerException
 at 
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
 at 
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
 at 
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
 at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
 at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown 
Source)
 at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source)
 at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
 at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
 at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
 at javax.xml.parsers.SAXParser.parse(Unknown Source)
 at 
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
 at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
 at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
 at 
org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
 at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
 at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
 at org.apache.axis.client.Call.invoke(Call.java:2767)
 at org.apache.axis.client.Call.invoke(Call.java:2443)
 at org.apache.axis.client.Call.invoke(Call.java:2366)
 at org.apache.axis.client.Call.invoke(Call.java:1812)
 at 
com.scania.app.tyc.ws.AC_Case_HandlingSoapBindingStub.list_workshop_open_case(AC_Case_HandlingSoapBindingStub.java:2980)
 at com.scania.app.WsTest.testtyc(WsTest.java:51)
 at com.scania.app.WsTest.main(WsTest.java:31)

Total time:2015 ms


_
Peter Grape
Websphere portal  content developer

SCANIA Infomate AB
SAIL, SSP  PUM Technical support and development

Phone: +46-8-553 859 12
E-mail:peter.gr...@scania.commailto:peter.gr...@scania.com


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug10 www.wwrug.com ARSlist: Where the Answers Are