Discussion:
[AXIS2]
Viji
2018-08-10 13:17:51 UTC
Permalink
Hi,

I have an error when running axis2 client with stub generated using
Java 1.8 and Axis2 1.7.8

org.apache.axis2.AxisFault

at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:122)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:66)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:347)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:414)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:150)
at ch.e_dec.www.services.edecservice.v4.EdecServiceStub.goodsDeclarations(EdecServiceStub.java:484)
at edecwebtest.EdecTest.main(EdecTest.java:85)
Caused by: java.lang.NullPointerException
at org.apache.axis2.builder.MIMEBuilder.processDocument(MIMEBuilder.java:72)
at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:203)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:144)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:107)


Can anyone help please ?


Regards,
Viji
robertlazarski
2018-08-10 13:28:44 UTC
Permalink
Hi,
I have an error when running axis2 client with stub generated using Java 1.8 and Axis2 1.7.8
org.apache.axis2.AxisFault
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:122)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:66)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:347)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:414)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:150)
at ch.e_dec.www.services.edecservice.v4.EdecServiceStub.goodsDeclarations(EdecServiceStub.java:484)
at edecwebtest.EdecTest.main(EdecTest.java:85)
Caused by: java.lang.NullPointerException
at org.apache.axis2.builder.MIMEBuilder.processDocument(MIMEBuilder.java:72)
at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:203)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:144)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:107)
Can anyone help please ?
Regards,
Viji
Seems similar to the problems you had a few weeks ago with the mime type,
did you get that issue sorted out?

MIMEBuilder is having a problem here, my guess is the mime type is null so
the the builder reference is null. However the attachments reference may be
null too. Are you able to debug what is null here and that you are sending
a valid mime type? The 'type' below could be null and as a side affect the
other Objects could be null.

72 return
builder.processDocument(attachments.getRootPartInputStream(false),
73 type, msgContext);
Viji
2018-08-10 13:48:46 UTC
Permalink
yes you are right, same issue i had reported in developer mail list. I got
subscribed to developer mail list by mistake. so I've unsubscribed and
added account in user list .

Regarding the issue ,

In mimebuilder
String type = ct.getParameter("type");
Builder builder = MessageProcessorSelector.getMessageBuilder(type,
msgContext);

here type is null so builder is getting as null.

setting contetn type in request
options.setProperty(Constants.Configuration.FILE_SIZE_THRESHOLD, "1000");
options.setProperty(Constants.Configuration.DISABLE_REST, Boolean.TRUE);
options.setProperty(Constants.Configuration.DISABLE_SOAP12, Boolean.TRUE);
options.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING,
"UTF-8");
options.setProperty(Constants.Configuration.CONTENT_TYPE,
org.apache.axiom.soap.SOAP11Constants.SOAP_11_CONTENT_TYPE);

But i have no idea, how can fix this
Post by robertlazarski
Hi,
I have an error when running axis2 client with stub generated using Java 1.8 and Axis2 1.7.8
org.apache.axis2.AxisFault
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:122)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:66)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:347)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:414)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:150)
at ch.e_dec.www.services.edecservice.v4.EdecServiceStub.goodsDeclarations(EdecServiceStub.java:484)
at edecwebtest.EdecTest.main(EdecTest.java:85)
Caused by: java.lang.NullPointerException
at org.apache.axis2.builder.MIMEBuilder.processDocument(MIMEBuilder.java:72)
at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:203)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:144)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:107)
Can anyone help please ?
Regards,
Viji
Seems similar to the problems you had a few weeks ago with the mime type,
did you get that issue sorted out?
MIMEBuilder is having a problem here, my guess is the mime type is null so
the the builder reference is null. However the attachments reference may be
null too. Are you able to debug what is null here and that you are sending
a valid mime type? The 'type' below could be null and as a side affect the
other Objects could be null.
72 return builder.processDocument(attachments.
getRootPartInputStream(false),
73 type, msgContext);
--
With Love n Regards
Viji
robertlazarski
2018-08-10 13:54:13 UTC
Permalink
Post by Viji
yes you are right, same issue i had reported in developer mail list. I got
subscribed to developer mail list by mistake. so I've unsubscribed and
added account in user list .
Regarding the issue ,
In mimebuilder
String type = ct.getParameter("type");
Builder builder = MessageProcessorSelector.getMessageBuilder(type,
msgContext);
here type is null so builder is getting as null.
setting contetn type in request
options.setProperty(Constants.Configuration.FILE_SIZE_THRESHOLD, "1000");
options.setProperty(Constants.Configuration.DISABLE_REST, Boolean.TRUE);
options.setProperty(Constants.Configuration.DISABLE_SOAP12, Boolean.TRUE);
options.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING,
"UTF-8");
options.setProperty(Constants.Configuration.CONTENT_TYPE,
org.apache.axiom.soap.SOAP11Constants.SOAP_11_CONTENT_TYPE);
But i have no idea, how can fix this
See if this works for you:

options.setProperty(Constants.Configuration.CONTENT_TYPE,
Constants.MIME_CT_TEXT_XML);

Which is:

public static final String MIME_CT_TEXT_XML = "text/xml";
Viji
2018-08-14 05:07:09 UTC
Permalink
hello ,

i've tried
options.setProperty(Constants.Configuration.CONTENT_TYPE,
Constants.MIME_CT_TEXT_XML);

Which is:

public static final String MIME_CT_TEXT_XML = "text/xml";


but no change, same error getting .
Post by Viji
Post by Viji
yes you are right, same issue i had reported in developer mail list. I
got subscribed to developer mail list by mistake. so I've unsubscribed and
added account in user list .
Regarding the issue ,
In mimebuilder
String type = ct.getParameter("type");
Builder builder = MessageProcessorSelector.getMessageBuilder(type,
msgContext);
here type is null so builder is getting as null.
setting contetn type in request
options.setProperty(Constants.Configuration.FILE_SIZE_THRESHOLD, "1000");
options.setProperty(Constants.Configuration.DISABLE_REST, Boolean.TRUE);
options.setProperty(Constants.Configuration.DISABLE_SOAP12,
Boolean.TRUE);
options.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING,
"UTF-8");
options.setProperty(Constants.Configuration.CONTENT_TYPE,
org.apache.axiom.soap.SOAP11Constants.SOAP_11_CONTENT_TYPE);
But i have no idea, how can fix this
options.setProperty(Constants.Configuration.CONTENT_TYPE,
Constants.MIME_CT_TEXT_XML);
public static final String MIME_CT_TEXT_XML = "text/xml";
--
With Love n Regards
Viji
robertlazarski
2018-08-14 13:36:21 UTC
Permalink
Post by Viji
hello ,
i've tried
options.setProperty(Constants.Configuration.CONTENT_TYPE,
Constants.MIME_CT_TEXT_XML);
public static final String MIME_CT_TEXT_XML = "text/xml";
but no change, same error getting .
Your payload from the axis2 client still has no content type aka mime type
? You are running 1.7.8? Can you please paste the entire client code and
payload you are using currently?

You seemed to fix a similar problem a few weeks ago, is that correct?

As stated previously, running the unit test code as I pasted should
resemble the code and behavior you are running on your client. In other
words, the expectation is the SWA attachments work since the unit tests
show it working.

Regards,
Robert

Loading...