Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Web Services for GP 10.0 and Java with Axis

72 views
Skip to first unread message

Jason Williams

unread,
Aug 2, 2007, 2:22:18 PM8/2/07
to
We have a client that is attempting to create SOP documents (SalesInvoice
objects) through Web Services by passing requests from their custom Java
application. They have create a proxy class using Axis and can pass in
several master records without a hitch.

The problems crop up when the try to create more complicated messages like
the SalesInvoice object. We keep getting errors that seem to indicate that we
are not creating a valid message to send to the web services. We don't get
any exceptions from the web services. Instead, the exceptions come back from
Java stating:

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.io.IOException: java.io.IOException: java.io.IOException:
Non nillable element 'type' is null.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.io.IOException:
java.io.IOException: java.io.IOException: Non nillable element 'type' is null.
at
org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:288)
at
org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1518)
at
org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:994)
at
org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:815)
at org.apache.axis.message.RPCParam.serialize(RPCParam.java:208)
at
org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
at
org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
at
org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:478)
at
org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
at org.apache.axis.client.Call.invoke(Call.java:2815)
at org.apache.axis.client.Call.invoke(Call.java:2501)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:1835)
at
com.microsoft.schemas.dynamics.gp._2006._01.Dynamics_x0020_GPSoapStub.createSalesInvoice(Dynamics_x0020_GPSoapStub.java:20716)
at
com.iuniverse.gp.webservice.test.ClientTest.createSOP(ClientTest.java:1201)
at
com.iuniverse.gp.webservice.test.ClientTest.main(ClientTest.java:251)


If anyone has experience with this type of error, I would appreciate it. We
have set the property "SalesInvoice.Type" to the Invoice value of the
enumeration. What element named 'type' is it complaining about?

Thank you for any assistance you can provide.

Sincerely,
Jason Williams

HSalim[MVP]

unread,
Aug 2, 2007, 5:40:02 PM8/2/07
to
I think it may be be the document type - sales order /or invoice etc.
can you send me the xml file?
Thanks
HS

"Jason Williams" <JasonW...@discussions.microsoft.com> wrote in message
news:B52152AF-D953-4818...@microsoft.com...

Jason Williams

unread,
Aug 2, 2007, 8:18:01 PM8/2/07
to
HS,
I'm unfamiliar with Java (I'm a .NET coder) and the client is unfamiliar
with web service calls. This makes for blind leading the blind situation. So,
I don't know how to get the serialized document for you. Can you give me
instructions for the Eclipse environment that will get us the serialized form
of the object?

Thanks.
-Jason

HSalim[MVP]

unread,
Aug 2, 2007, 8:43:51 PM8/2/07
to
can't you just email it to me?
hsalim msn com


"Jason Williams" <JasonW...@discussions.microsoft.com> wrote in message

news:A4E2E2CA-5C6A-44A5...@microsoft.com...

Grant Swenson [MSFT]

unread,
Aug 3, 2007, 10:04:05 AM8/3/07
to
Jason,
Thanks for using the newsgroups, I hope we can find a solution to your
issue. Personally, I know the WSDL that comes back from the GPWebService is
huge, and can cause problems for clients that try to generate a proxy from
it. That's where I'm guessing your problem is. To verify, though, you need to
look at the SOAP message that's sent to the web service, and then compare it
to the one passed by .Net in the same scenario. I'm not a Java expert, but if
it's possible to dump out the code as it's being serialized, that's where I'd
start. That "MessageElement.java:1208" might be helpful to see what the
element was that's tring to be serialized. Or, if eclipse lets your step into
the code, maybe you can watch the values in memory down the stack, and see
which one is "Non nillable element 'type' is null. " Another thing that could
be happening is that Java is warning you that you haven't provided necessary
values in all the fields. Maybe if we could see some sample code for your
call, we could compare it with required fields from the web service level and
help debug?
If you do get some requests to go through, you should be able to use Fiddler
(http://fiddlertool.com) to capture the SOAP messages sent over the wire.

Good luck!
Grant
Software Quality Assurance
Microsoft Business Solutions

This posting is provided "AS IS" with no warranties, and confers no rights.

Jason Williams

unread,
Aug 6, 2007, 1:48:01 PM8/6/07
to
Thank you for the suggestions. At this point, we're still suffering through.

The proxy class that Axis created seems to be the problem. While I can send
a test document with .NET and only fill in a limited number of required
properties, the implementation in Java is requiring us to fill in more than
that. Not to turn this into a Java bashing thread, but there has got to be a
better way to do this. Right now, my Java programmer is just going through
and filling in every property on the object with a value so we won't be
passing in any nulls.

Java is throwing an exception before we can even transmit anything across
the wire. We have attempted to look at the proxy class and find the fields it
shows as non-nillable. We filled them all in, and we're still getting this
error. No exceptions are logged on the server and in fact, nothing is
transmitted across the wire. The fault seems to occur as Java tries to
serialize the object, but my Java developer (who seems to be a bit on the
novice side) is so unfamiliar with this type of programming that he's not
sure how to debug that step.

I wish I could get something more substantial to everyone here, but I'm
afraid I need a better Java programmer first. So, thanks for your responses
and if we can resolve this any times soon, I'll post some more details here.

-Jason

joelgardi

unread,
Sep 7, 2007, 1:20:31 PM9/7/07
to
Jason,
I am a very experienced Java programmer and aslo have expertise in webservices and SOAP . I am also trying to access the GP webservice and I am having authentication issues.
I would appreciate if your Java programmer could tell me how to authenticate to the GP webservice so that I can successfully invoke the service passing in the SOAP request. In exchange, I can help your programmer with any java technical issues.
My cell phon enumber is: 678-787-0764
Thanks,
Joel

EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com

joelgardi

unread,
Sep 7, 2007, 1:21:29 PM9/7/07
to

Srinivas

unread,
Apr 1, 2011, 12:10:33 PM4/1/11
to
Joel,
Could you please let me know what solution was provided earlier to this problem? I am facing the same problem now making a web service call using Axis from client to a service.
Thanks,
Srinivas

> On Thursday, August 02, 2007 2:22 PM JasonWilliam wrote:

> We have a client that is attempting to create SOP documents (SalesInvoice
> objects) through Web Services by passing requests from their custom Java
> application. They have create a proxy class using Axis and can pass in
> several master records without a hitch.
>
> The problems crop up when the try to create more complicated messages like
> the SalesInvoice object. We keep getting errors that seem to indicate that we
> are not creating a valid message to send to the web services. We don't get
> any exceptions from the web services. Instead, the exceptions come back from
> Java stating:
>
> AxisFault
> faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
> faultSubcode:
> faultString: java.io.IOException: java.io.IOException: java.io.IOException:

> Non nillable element 'type' is null.


>> On Thursday, August 02, 2007 5:40 PM HSalim[MVP] wrote:

>> I think it may be be the document type - sales order /or invoice etc.
>> can you send me the xml file?
>> Thanks
>> HS


>>> On Thursday, August 02, 2007 8:18 PM JasonWilliam wrote:

>>> HS,
>>> I'm unfamiliar with Java (I'm a .NET coder) and the client is unfamiliar
>>> with web service calls. This makes for blind leading the blind situation. So,
>>> I don't know how to get the serialized document for you. Can you give me
>>> instructions for the Eclipse environment that will get us the serialized form
>>> of the object?
>>>
>>> Thanks.
>>> -Jason
>>>
>>> "HSalim[MVP]" wrote:


>>>> On Thursday, August 02, 2007 8:43 PM HSalim[MVP] wrote:

>>>> cannot you just email it to me?
>>>> hsalim msn com


>>>>> On Friday, August 03, 2007 10:04 AM GrantSwensonMSF wrote:

>>>>> Jason,
>>>>> Thanks for using the newsgroups, I hope we can find a solution to your
>>>>> issue. Personally, I know the WSDL that comes back from the GPWebService is
>>>>> huge, and can cause problems for clients that try to generate a proxy from
>>>>> it. That's where I'm guessing your problem is. To verify, though, you need to
>>>>> look at the SOAP message that's sent to the web service, and then compare it
>>>>> to the one passed by .Net in the same scenario. I'm not a Java expert, but if
>>>>> it's possible to dump out the code as it's being serialized, that's where I'd
>>>>> start. That "MessageElement.java:1208" might be helpful to see what the
>>>>> element was that's tring to be serialized. Or, if eclipse lets your step into
>>>>> the code, maybe you can watch the values in memory down the stack, and see
>>>>> which one is "Non nillable element 'type' is null. " Another thing that could
>>>>> be happening is that Java is warning you that you haven't provided necessary
>>>>> values in all the fields. Maybe if we could see some sample code for your
>>>>> call, we could compare it with required fields from the web service level and
>>>>> help debug?
>>>>> If you do get some requests to go through, you should be able to use Fiddler
>>>>> (http://fiddlertool.com) to capture the SOAP messages sent over the wire.
>>>>>
>>>>> Good luck!
>>>>> Grant
>>>>> Software Quality Assurance
>>>>> Microsoft Business Solutions
>>>>>
>>>>> This posting is provided "AS IS" with no warranties, and confers no rights.
>>>>>
>>>>>

>>>>> "Jason Williams" wrote:


>>>>>> On Monday, August 06, 2007 1:48 PM JasonWilliam wrote:

>>>>>> Thank you for the suggestions. At this point, we're still suffering through.
>>>>>>
>>>>>> The proxy class that Axis created seems to be the problem. While I can send
>>>>>> a test document with .NET and only fill in a limited number of required
>>>>>> properties, the implementation in Java is requiring us to fill in more than
>>>>>> that. Not to turn this into a Java bashing thread, but there has got to be a
>>>>>> better way to do this. Right now, my Java programmer is just going through
>>>>>> and filling in every property on the object with a value so we won't be
>>>>>> passing in any nulls.
>>>>>>
>>>>>> Java is throwing an exception before we can even transmit anything across
>>>>>> the wire. We have attempted to look at the proxy class and find the fields it
>>>>>> shows as non-nillable. We filled them all in, and we're still getting this
>>>>>> error. No exceptions are logged on the server and in fact, nothing is
>>>>>> transmitted across the wire. The fault seems to occur as Java tries to
>>>>>> serialize the object, but my Java developer (who seems to be a bit on the
>>>>>> novice side) is so unfamiliar with this type of programming that he's not
>>>>>> sure how to debug that step.
>>>>>>
>>>>>> I wish I could get something more substantial to everyone here, but I'm
>>>>>> afraid I need a better Java programmer first. So, thanks for your responses
>>>>>> and if we can resolve this any times soon, I'll post some more details here.
>>>>>>
>>>>>> -Jason
>>>>>>
>>>>>>
>>>>>> "Grant Swenson [MSFT]" wrote:


>>>>>>> On Friday, September 07, 2007 1:20 PM Joel Gardi wrote:

>>>>>>> Jason,
>>>>>>>
>>>>>>> I am a very experienced Java programmer and aslo have expertise in webservices and SOAP . I am also trying to access the GP webservice and I am having authentication issues.
>>>>>>>
>>>>>>> I would appreciate if your Java programmer could tell me how to authenticate to the GP webservice so that I can successfully invoke the service passing in the SOAP request. In exchange, I can help your programmer with any java technical issues.
>>>>>>>
>>>>>>> My cell phon enumber is: 678-787-0764
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Joel

0 new messages