Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6775025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:51:28+00:00 2026-05-26T15:51:28+00:00

difference between web services clients results in one error in one success I have

  • 0

difference between web services clients results in one error in one success
I have web service I build using JAXWS 2.2 on tomcat , based on wsdl .
Based on this wsdl I created client that works great .
But when I getting web services from external client im getting errors on server , I sniffed the network , and I saw there are differences
But I don’t know how critical they are mostly namespaces , as I see from sniffin the external request I see they used AXIS to build the client .
For the tomcat exception im getting , I know according to the logs on the server side it gets to the service but fails in one of the stubs methods
Here is my client service that works:

POST /console/ws/APIEndpoint HTTP/1.1
Accept: text/xml, multipart/related
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://foo.com/ServerApi/sendMessageRequest"
User-Agent: JAX-WS RI 2.2.5-b01 
Host: 192.168.3.69:18112
Connection: keep-alive
Content-Length: 1221

<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns3:sendMessage xmlns:ns2="http://www.foo.com" xmlns:ns3="http://www.foo.com/">
<NP_MESSAGE>
<ns2:HEADER>
<REQUEST_ID>NPAABBYYMMDDXXXXXZZZZ</REQUEST_ID>
<PROCESS_TYPE>PORT</PROCESS_TYPE>
<MSG_TYPE>Publish</MSG_TYPE>
<TRX_NO>MI000004548992</TRX_NO>
<VERSION_NO>1</VERSION_NO>
<RETRY_NO>2</RETRY_NO>
<RETRY_DATE>2011-11-03T11:48:23.769+02:00</RETRY_DATE>
<FROM>MI</FROM>
<TO>aa</TO>
</ns2:HEADER>
<BODY>
</BODY>
</NP_MESSAGE>
</ns3:sendMessage>
</S:Body>
</S:Envelope>

and now this is the request from external client that doesn’t work:

POST /console/ws/APIEndpoint HTTP/1.1
Host: 46.31.96.42:18112
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.4
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "http://foo.com/sendMessage"
Content-Length: 1197

Max-Forwards: 10
<?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>
<sendMessage xmlns="http://foo.com/">
<NP_MESSAGE>
<ns1:HEADER xmlns:ns1="http://foo.com">
<REQUEST_ID xmlns="">NPMICL111103350390001
</REQUEST_ID>
<PROCESS_TYPE xmlns="">PORT</PROCESS_TYPE>
<MSG_TYPE xmlns="">Publish</MSG_TYPE>
<TRX_NO xmlns="">MI000004554248</TRX_NO>
<VERSION_NO xmlns="">1</VERSION_NO>
<RETRY_NO xmlns="">2</RETRY_NO>
<RETRY_DATE xmlns="">2011-11-03T13:00:06.659+02:00</RETRY_DATE>
<FROM xmlns="">MI</FROM>
<TO xmlns="">TZ</TO>
</ns1:HEADER>
<BODY xmlns="">
</BODY>
</NP_MESSAGE>
</sendMessage>
</soapenv:Body>
</soapenv:Envelope> 

the exception im getting from the tomcat looks like this :

 03/11/2011 12:33:43 com.sun.xml.ws.server.sei.EndpointMethodHandler invoke
SEVERE: null
java.lang.NullPointerException
        at com.foo.gw.ServiceApi.sendMessage(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.xml.ws.api.server.InstanceResolver$1.invoke(InstanceResolver.java:250)
        at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:150)
        at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:261)

and the tomcat returns : HTTP/1.1 500 Internal Server Error

i notice that in the header the
some parameters are missing between them but after reading some info i don’t thing its the reason. beacose the request do get to the service in tomcat

UPDATE:
here is where i thing im getting the exception , i can’t debug only scatter logs
here is how my service class looks like :

UPDATE 2:
i know that the NP_MESSAGE is null but why i can see it get data when it comes from the client

@WebService (targetNamespace="http://www.foo.com/")
public class Api {  
    Api()
    {

    }
    @WebResult(name="return_NP_ACK", partName="return_NP_ACK")
    @WebMethod(operationName = "sendMessage")
    public NPACK sendMessage(@WebParam(name = "NP_MESSAGE")NPMESSAGE NP_MESSAGE)
    {
    if(null != NP_MESSAGE)
{
    Logger.WriteLog("WebService NP_MESSAGE not null ",Level.DEBUG);


}
else
{
     //  I know that NP_MESSAGE is null im getting here !!!
    Logger.WriteLog("WebService NP_MESSAGE is null ",Level.DEBUG);
}
    HEADER hHeader = NP_MESSAGE.getHEADER();  <-- here is where the exception 
    ....
    ...
    }
}

UPDATE 3:
i found something but im not sure if its my case . and if it. how can i fix this .
this is link that talks about AX-RPC versus JAX-WS . i don’t have the full knowledge if this is my case .
doesn’t every WS framework suppose to always create stubs from wsdl that can talk no mater what did it , like contract like CORBA. never mine ..
any way how do i fix it , i don’t have option to work with AXIS . can’t i just tell JAXWS to work with the axis protocol ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:51:29+00:00Added an answer on May 26, 2026 at 3:51 pm

    i think the problem is here in the axis message:

    <sendMessage xmlns="http://foo.com/">
    <NP_MESSAGE>
    

    because the xmlns definition defines the default namespace, the NP_MESSAGE element is now also defined in that namespace. however, in the jaxws message, there is no default namespace, so the NP_MESSAGE element has no namespace.

    you might try putting all your elements (WebParam, WebResult) in the same targetNamespace as your WebService.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What is the difference between using a Web Service and calling a server page
What is the difference between: int[] myIntArray and list<int> myIntArray ? In web services
What's the difference between absolute path & relative path when using any web server
I have a RESTful web service deployed at http://example.com/v1/SomeResource . One day, a new
I have a JAX-RPC web service that I am attempting to consume using Spring.
I was trying to put the difference between websites and web services (irrespective of
what are web services(Rmi,ejb,soap)? what is the difference between web services and web application?
What is the difference between Web farm and Web Garden?
What is the difference between System.Web.Cache and HTTPContext.Curent.Cache? In which cases both are used?
Is there any difference between website and web application project? What if you are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.