[ https://issues.apache.org/jira/browse/AXIS2-2355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
sumedha rubasinghe resolved AXIS2-2355. --------------------------------------- Resolution: Fixed Fixed in Axis 1.2. See my previous comment for details. > Axis2 SOAP API Impl Issue > ------------------------- > > Key: AXIS2-2355 > URL: https://issues.apache.org/jira/browse/AXIS2-2355 > Project: Axis 2.0 (Axis2) > Issue Type: Bug > Components: kernel > Affects Versions: 1.1.1 > Environment: Axis2-1.1.1, tomcat-5.5.20 > Reporter: Sigirisetty Surya Kiran > Assigned To: sumedha rubasinghe > Attachments: disclaim.txt > > > I wrote a client code for accessing a simple web service. But SOAP request > generated by axis2-saaj-1.1.1.jar seems to be having problem. > I'm not able to add a text node to the ws operation element. > package com.ssk.ws.custom.wsdl.types; > import java.net.URL; > import javax.xml.soap.MessageFactory; > import javax.xml.soap.Name; > import javax.xml.soap.SOAPBody; > import javax.xml.soap.SOAPConnection; > import javax.xml.soap.SOAPConnectionFactory; > import javax.xml.soap.SOAPElement; > import javax.xml.soap.SOAPFactory; > import javax.xml.soap.SOAPMessage; > public class HRServiceClient { > public static void main(String[] args) throws Exception { > SOAPConnectionFactory scf = > SOAPConnectionFactory.newInstance(); > SOAPConnection sConn = scf.createConnection(); > MessageFactory mf = MessageFactory.newInstance(); > SOAPMessage msg = mf.createMessage(); > SOAPBody body = msg.getSOAPBody(); > SOAPFactory soapFactory = SOAPFactory.newInstance(); > Name bn = soapFactory.createName("getEmployee", > "ns1", "http://types.wsdl.custom.ws.ssk.com/xsd"); > SOAPElement op = soapFactory.createElement(bn); > body.addChildElement(op); > Name pn = soapFactory.createName("p1", > "ns1", > "http://types.wsdl.custom.ws.ssk.com/xsd"); > SOAPElement p1 = soapFactory.createElement(pn); > //1.doesnt work > //p1.addTextNode("1"); > //2.doesnt work > //SOAPElement val = p1.addTextNode("1"); > //p1.addChildElement(val); > //3.doesnt work > //p1.setValue("1"); > //4.doesnt work > p1.setNodeValue("1"); > op.addChildElement(p1); > java.net.URL endpoint = new URL( > "http://localhost:8080/axis2/services/HRService"); > msg.writeTo(System.out); > System.out.println(); > System.out.println(); > SOAPMessage response = sConn.call(msg, endpoint); > response.writeTo(System.out); > } > } > <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> > <soapenv:Header /> > <soapenv:Body xmlns:ns1="http://types.wsdl.custom.ws.ssk.com/xsd"> > <ns1:getEmployee > xmlns="http://types.wsdl.custom.ws.ssk.com/xsd" /> > </soapenv:Body> > </soapenv:Envelope> > Regards, > sigirisetti -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]