| | |
putting a soap message in a variable to be sent
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Mar 2007
Posts: 2
Reputation:
Solved Threads: 0
good day!..
i have this soap message that will be sent to a simple service provider simulator..
since this is only a simulation, i there will be only one service named leave (e.g. vacation leave, sick leave, etc.)
im using tcp for communication between my client and service provider..
basically, i have this code line that would stream my message to the service provider..
where output there is declared as:
i have successfully streamed my message to the service provider when i assigned it a string value like the word "dog"
but what i want to happen is that the message will have the value of the soap message stated above..
how can i do that?
any help in solving this problem will be greatly appreciated..
thanx!..
God bless!..
i have this soap message that will be sent to a simple service provider simulator..
since this is only a simulation, i there will be only one service named leave (e.g. vacation leave, sick leave, etc.)
Java Syntax (Toggle Plain Text)
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://leaveprocessor.blueprints.jbi.sun.com/"> <soapenv:Body> <ns1:processApplication> <appName>applicant</appName> <leaveType>type of leave</leaveType> <numDays>number of days</numDays> </ns1:processApplication> </soapenv:Body> </soapenv:Envelope>
im using tcp for communication between my client and service provider..
basically, i have this code line that would stream my message to the service provider..
Java Syntax (Toggle Plain Text)
output.println(message);
where output there is declared as:
Java Syntax (Toggle Plain Text)
output = new PrintStream(clientSocket.getOutputStream());
i have successfully streamed my message to the service provider when i assigned it a string value like the word "dog"
but what i want to happen is that the message will have the value of the soap message stated above..
how can i do that?
any help in solving this problem will be greatly appreciated..
thanx!..
God bless!..
•
•
Join Date: Mar 2007
Posts: 2
Reputation:
Solved Threads: 0
ive done this but there are too many errors:
most of the errors occur on the symbols of the soap message such as ":", "<", etc.
Java Syntax (Toggle Plain Text)
import java.io.*; import java.net.*; public class createrequest { public String creator() { String message="<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://leaveprocessor.blueprints.jbi.sun.com/"> <soapenv:Body> <ns1:processApplication> <appName>name</appName> <leaveType>Vacation</leaveType> <numDays>4</numDays> </ns1:processApplication> </soapenv:Body> </soapenv:Envelope>"; return message; } }
most of the errors occur on the symbols of the soap message such as ":", "<", etc.
![]() |
Similar Threads
- Shopping Cart Not Working (ASP.NET)
- can i access databases using SOAP? (RSS, Web Services and SOAP)
- undefined variable error (PHP)
- Soap (RSS, Web Services and SOAP)
- SOAP Envelope Problem (RSS, Web Services and SOAP)
- Need Help with variable initialization (Java)
Other Threads in the Java Forum
- Previous Thread: HELP!!!need help with command line arguments and creating a package in java. HELP!!!!
- Next Thread: Linux Java IDEs
Views: 1300 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for Java
android api apple applet application arguments array arrays automation bidirectional binary birt bluetooth calculator chat class classes client code columns component database designadrawingapplicationusingjavajslider detection draw eclipse editor error errors event exception expand file fractal game givemetehcodez graphics gui guidancer helpwithhomework html ide image inetaddress input integer intellij j2me java javamicroeditionuseofmotionsensor javaprojects jme jmf jni jpanel julia linux list loop map method methods mobile mobiledevelopmentcreatejar myaggfun netbeans newbie number object oracle os plazmic print problem program programming project recursion scanner screen server set signing size smart sms smsspam socket sort sql string subclass support swing test threads time transfer tree windows






