Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JAX-WS Namespace error  RSS feed

 
Valentin Ivanov
Ranch Hand
Posts: 38
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I use top down approach for creating simple JAX-WS (the goal - to understand how it works in details).

So what I've done so far:
1. Create WSDL file(using Eclipse).
2. Use wsimport to generate code artefacts
3. I've Implemented the SEI.
4. Create web.xml and sun-jaxws.xml descriptors.
5. Pack all stuff in WAR.
6. Deploy on tomcat 7.0.53

I got error :
And how is that they doesn't match? The SEI is autogenerated from the WSDL.
So the idea is that I shouldn't have to change the generated code. Therefore I'm missing something in the WSDL or implementation class.

Here is the SEI snipped:
Here is the implementation:
Here is the WSDL:
Here is the sun-jaxws.xml:
 
g tsuji
Ranch Hand
Posts: 697
3
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SEVERE: WSSERVLET11: failed to parse runtime descriptor: Port namespace doesnt match Service namespace {1}
com.sun.xml.ws.server.ServerRtException: Port namespace doesnt match Service namespace {1}

That is the case if you posted a faithful reproduction of the real code.

<endpoint name="MyHello" interface="org.example.www.LastNameServicePort" wsdl="WEB-INF/wsdl/LastName.wsdl" service="{http://www.example.org}LastNameService"
port="{http://www.example.org}LastNamePort" implementation="org.example.www.LastNameImpl" url-pattern="/myservice"/>
 
Sujeeth Pakala
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I solved this problem by keeping all required jar files in the classpath of war file.

Plsease check this and let me know.
 
Valentin Ivanov
Ranch Hand
Posts: 38
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
g tsuji wrote:That is the case if you posted a faithful reproduction of the real code.

I can't believe it, that is not real. The error message is so meaningful, and I have eye compared those two strings(namespaces) and never catch that ** bracket :-).
I'm going to jump off the third floor.
Anyway, it works perfect. Thank you
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!