• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to create a SOAP request Message from a sample XML

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 .
 
Ranch Hand
Posts: 491
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...)
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 491
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.


 
reply
    Bookmark Topic Watch Topic
  • New Topic