Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to create a SOAP request Message from a sample XML

 
Nidhi Chandra
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Iam really struggling with this . I have a webservice to call which is secured by certificate and digital signature . All this needs to be passed as a part of SOAP request which Iam creating via Java code , but even after spending days on it the digital signature part which Iam trying to create is not getting formed properly .
The code creates the request properly till BinaryToken and breaks from "Name signatureToken" ...Looking for guidance as to what is not right in the code

This is the sample XML :




and the code which I have written to form the above XML via code is as :



Any help in solving this will be my saviour . Thanks to all .
 
H Paul
Ranch Hand
Posts: 471
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Any help in solving this will be my saviour . Thanks to all .


Am a beginner. I think your saviour is "Divide and Conquer".
Just break down your big sequential code into a small method which do 1 and 1 thing and test it to see if it is working as output expected gradually.
If not, post that segment of code and ask help for why/where/what is the wrong.

(Remember: The journey of 1000 miles begin with 1 small step. Going forward...)
 
Rajashekhar Pandirla
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am not getting......
please give sample example for generating and sending a soap message
 
H Paul
Ranch Hand
Posts: 471
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assumption:
If all you need is getting the harded-coded SOAP message as posted
AND if you do not care how to code it or the code is secondary as of now
then the code below is 1 quick way using JDK1.6

Idea: Save the hard-coded SOAP Message in a external file, for example, C:\\soapmessage.xml and read file in.
That read file will be used to create a hard-coded SOAP Message which you will use to send to the Web service provider.


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic