• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Error while genrating a simple response

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



<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"; xmlns:v3="http://user.rws.pearson.com/doc/V3/">;



package RumbaCom;

import java.net.*;
import java.io.*;

public class PostXml {

public static void main(String[] args) {

try {

String xmldata="<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\"; xmlns:v3=\"http://user.rws.pearson.com/doc/V3/\">"+


//Create socket
String hostname = "user.rumba.int.pearsoncmg.com";
int port = 80;
InetAddress addr = InetAddress.getByName(hostname);
Socket sock = new Socket(addr, port);

//Send header
String path = "/UserLifeCycle/services/read/V3";
BufferedWriter wr = new BufferedWriter(new OutputStreamWriter(sock.getOutputStream()));
// You can use "UTF8" for compatibility with the Microsoft virtual machine.
wr.write("POST " + path + " HTTP/1.0\r\n");
wr.write("Host: user.rumba.int.pearsoncmg.com\r\n");
wr.write("Content-Length: " + xmldata.length() + "\r\n");
wr.write("Content-Type: text/xml; charset=\"utf-8\"\r\n");

//Send data

// Response
BufferedReader rd = new BufferedReader(new InputStreamReader(sock.getInputStream()));
String line;
while((line = rd.readLine()) != null)
} catch (Exception e) {

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

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

Jigesh Shah
Those cherries would go best on cherry cheesecake. Don't put those cherries on this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic