Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error while genrating a simple response

 
Jigeshs Shahs
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am a Software Tester and want to verify that the response for my WSDL is correct or not
So I got a piece of code which generates the response for WSDL

Given below is the WSDL , the Request and the Code

WSDL
http://user.rumba.int.pearsoncmg.com/UserLifeCycle/UserLifeCycleReadV3.wsdl

Request


When I try to run the code with my WSDL it is giving me the following Error but when I use the same code to Test the WebService which contains WWW it works fine and generates correct Reponse For e.g.http://www.webservicex.net/CurrencyConvertor.asmx?wsdl

HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
Content-Length: 4758
Date: Mon, 30 Apr 2012 09:29:47 GMT
Connection: close

<html><head><title>Apache Tomcat/6.0.35 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.ws.soap.axiom.AxiomSoapMessageCreationException: Could not create message: Transport level information does not match with SOAP Message namespace URI; nested exception is org.apache.axiom.soap.SOAPProcessingException: Transport level information does not match with SOAP Message namespace URI
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:894)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

I am unable to understand what is going and I dont know much about the WebServices
I want to use this code for My Automation Task and I don't want to use SOAP UI to Test the WebServices
Can anybody please help me on this to resolve the code

Thanks,
Jigesh Shah
 
Palak Mathur
Ranch Hand
Posts: 342
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jigeshs Shahs wrote:Hi All,
I am a Software Tester and want to verify that the response for my WSDL is correct or not
So I got a piece of code which generates the response for WSDL

Given below is the WSDL , the Request and the Code

WSDL
http://user.rumba.int.pearsoncmg.com/UserLifeCycle/UserLifeCycleReadV3.wsdl

Request


When I try to run the code with my WSDL it is giving me the following Error but when I use the same code to Test the WebService which contains WWW it works fine and generates correct Reponse For e.g.http://www.webservicex.net/CurrencyConvertor.asmx?wsdl

HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
Content-Length: 4758
Date: Mon, 30 Apr 2012 09:29:47 GMT
Connection: close

<html><head><title>Apache Tomcat/6.0.35 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.ws.soap.axiom.AxiomSoapMessageCreationException: Could not create message: Transport level information does not match with SOAP Message namespace URI; nested exception is org.apache.axiom.soap.SOAPProcessingException: Transport level information does not match with SOAP Message namespace URI
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:894)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

I am unable to understand what is going and I dont know much about the WebServices
I want to use this code for My Automation Task and I don't want to use SOAP UI to Test the WebServices
Can anybody please help me on this to resolve the code

Thanks,
Jigesh Shah


As per your WSDL, you are using SOAP 1.2. If you see the Http Header, then content type is defined as text/html. This is not correct. For SOAP1.2, you should set the content-type to application/soap+xml. Change this and it should work.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic