Author |
Message
|
tonythomasantony |
Posted: Fri Jul 20, 2007 3:38 am Post subject: Invoking Webservice |
|
|
Apprentice
Joined: 12 Aug 2006 Posts: 47
|
Hi ,
i am invoking WS through my flows.
MQinput>Compute>HTTPRequest>HttpReply
I Am constucting a SOAP message in Compute node.Below is the relevant code
--Save Message Descriptor Of the incoming message For Creating Response.
SET Environment.myMQMD=InputRoot.MQMD;
--Save Message Properties folder Of the incoming message
SET OutputRoot.Properties=InputRoot.Properties;
SET Environment.myProperties=InputRoot.Properties;
--Create HTTPHeader for the message
SET OutputRoot.HTTPRequestHeader.SOAPAction='';
--Declaring XML namespaces we will be using
DECLARE mySoapNS NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE myXSI NAMESPACE 'http://www.w3.org/2001/XMLSchema-instance';
DECLARE myXSD NAMESPACE 'http://www.w3.org/2001/XMLSchema';
DECLARE myNS1 NAMESPACE 'http://customer/xsd';
DECLARE myNS NAMESPACE 'http://customer';
--XML Declarations
SET OutputRoot.XMLNS.(XML.XmlDecl) ='';
SET OutputRoot.XMLNS.(XML.XmlDecl).(XML.Version)='1.0';
SET OutputRoot.XMLNS.(XML.XmlDecl).(XML.Encoding)='UTF-8';
--Creating SOAP Envelope
SET OutputRoot.XMLNS.mySoapNS:Envelope.(XML.NamespaceDecl)xmlns:"SOAP-ENV" =
'http://schemas.xmlsoap.org/soap/envelope/' ;
SET OutputRoot.XMLNS.mySoapNS:Envelope.(XML.NamespaceDecl)xmlns:xsi =
'http://www.w3.org/2001/XMLSchema-instance' ;
SET OutputRoot.XMLNS.mySoapNS:Envelope.(XML.NamespaceDecl)xmlns:xsd =
'http://www.w3.org/2001/XMLSchema' ;
-- Set the operation name and parameters
--SET OutputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.myNS1:add.(XML.NamespaceDecl)xmlns:ns1 = 'com.bsnl.client.CustomerService';
--SET OutputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.myNS1:add.(XML.NamespaceDecl)mySoapNS:encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/';
SET OutputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.myNS1:add.myNS1:custBean.cusId ='1000';
SET OutputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.myNS1:add.myNS1:custBean.cusId.(XML.Attribute)myXSI:type = 'xsd:string';
SET OutputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.myNS1:add.myNS1:custBean.pwd ='Yellapu';
SET OutputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.myNS1:add.myNS1:custBean.pwd.(XML.Attribute)myXSI:type = 'xsd:string';
set OutputLocalEnvironment.Destination.HTTP.RequestURL = 'http://9.184.2.56:8080/axis2/services/CustomerService';
My WSDL file looks like this
<wsdl:definitions xmlns:axis2="http://customer" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns="http://customer/xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://customer"><wsdl:types><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://customer/xsd">
<xs:element name="add">
<xs:complexType>
<xs:sequence>
<xs:element name="custBean" nillable="true" type="ns:CustomerBean" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CustomerBean" type="ns:CustomerBean" />
<xs:complexType name="CustomerBean">
<xs:sequence>
<xs:element name="cusId" nillable="true" type="xs:string" />
<xs:element name="pwd" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:element name="addResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" nillable="true" type="ns:CustomerResultBean" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CustomerResultBean" type="ns:CustomerResultBean" />
<xs:complexType name="CustomerResultBean">
<xs:sequence>
<xs:element name="addr1" nillable="true" type="xs:string" />
<xs:element name="addr2" nillable="true" type="xs:string" />
<xs:element name="city" nillable="true" type="xs:string" />
<xs:element name="custId" type="xs:int" />
<xs:element name="email" nillable="true" type="xs:string" />
<xs:element name="emailDname" nillable="true" type="xs:string" />
<xs:element name="emailPop" nillable="true" type="xs:string" />
<xs:element name="emailPwd" nillable="true" type="xs:string" />
<xs:element name="emailSmtp" nillable="true" type="xs:string" />
<xs:element name="emailUname" nillable="true" type="xs:string" />
<xs:element name="fName" nillable="true" type="xs:string" />
<xs:element name="lName" nillable="true" type="xs:string" />
<xs:element name="phone" type="xs:int" />
<xs:element name="pppPwd" nillable="true" type="xs:string" />
<xs:element name="pppUname" nillable="true" type="xs:string" />
<xs:element name="region" nillable="true" type="xs:string" />
<xs:element name="state" nillable="true" type="xs:string" />
<xs:element name="zip" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:schema></wsdl:types><wsdl:message name="addMessage"><wsdl:part name="part1" element="ns:add" /></wsdl:message><wsdl:message name="addResponseMessage"><wsdl:part name="part1" element="ns:addResponse" /></wsdl:message><wsdl:portType name="CustomerServicePortType"><wsdl:operation name="add"><wsdl:input message="axis2:addMessage" /><wsdl:output message="axis2:addResponseMessage" /></wsdl:operation></wsdl:portType><wsdl:binding name="CustomerServiceSOAP11Binding" type="axis2:CustomerServicePortType"><soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /><wsdl:operation name="add"><soap:operation soapAction="urn:add" style="document" /><wsdl:input><soap:body use="literal" namespace="http://customer" /></wsdl:input><wsdl:output><soap:body use="literal" namespace="http://customer" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:binding name="CustomerServiceSOAP12Binding" type="axis2:CustomerServicePortType"><soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /><wsdl:operation name="add"><soap12:operation soapAction="urn:add" style="document" /><wsdl:input><soap12:body use="literal" namespace="http://customer" /></wsdl:input><wsdl:output><soap12:body use="literal" namespace="http://customer" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="CustomerService"><wsdl:port name="CustomerServiceSOAP11port" binding="axis2:CustomerServiceSOAP11Binding"><soap:address location="http://localhost:8080/axis2/services/CustomerService" /></wsdl:port><wsdl:port name="CustomerServiceSOAP12port" binding="axis2:CustomerServiceSOAP12Binding"><soap12:address location="http://localhost:8080/axis2/services/CustomerService" /></wsdl:port></wsdl:service></wsdl:definitions>
I am getting
java.lang.StringIndexOutOfBoundsException: String index out of range:
in Failure terminal of the HTTPRequest node.
Can anyone check my esql code for invoking Service iscorrect or not?
thanks,
Tony |
|
Back to top |
|
 |
PieterV |
Posted: Fri Jul 20, 2007 5:24 am Post subject: |
|
|
Disciple
Joined: 04 Jan 2006 Posts: 164 Location: Belgium
|
Hard to say...
Have you tried putting the trace level on debug and looking at the output of that? |
|
Back to top |
|
 |
vsr |
Posted: Fri Jul 20, 2007 5:42 am Post subject: Re: Invoking Webservice |
|
|
Centurion
Joined: 04 Apr 2006 Posts: 104
|
Please try making the bolded lines as comments( or delete those lines) . I got the same problem before and deleting those lines fixed it. But i am not sure if this works for you. Like PieterV said, place a trace node after the http request node then post the exception here. By the way, it should be MQReply node where you typed HTTPReply node (I just wanted to make sure it's a typo mistake unless it's a second flow to the main flow where you use HTTPInput and MQOut nodes).
tonythomasantony wrote: |
SET OutputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.myNS1:add.myNS1:custBean.cusId ='1000';
SET OutputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.myNS1:add.myNS1:custBean.cusId.(XML.Attribute)myXSI:type = 'xsd:string';
SET OutputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.myNS1:add.myNS1:custBean.pwd ='Yellapu';
SET OutputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.myNS1:add.myNS1:custBean.pwd.(XML.Attribute)myXSI:type = 'xsd:string';
set OutputLocalEnvironment.Destination.HTTP.RequestURL = 'http://9.184.2.56:8080/axis2/services/CustomerService';
Tony |
|
|
Back to top |
|
 |
dilse |
Posted: Fri Jul 20, 2007 10:22 am Post subject: |
|
|
 Master
Joined: 24 Jun 2004 Posts: 270
|
Put a trace node after compute node and post the trace here. It would help us resolving the issue. |
|
Back to top |
|
 |
tonythomasantony |
Posted: Fri Jul 20, 2007 10:10 pm Post subject: |
|
|
Apprentice
Joined: 12 Aug 2006 Posts: 47
|
dilse wrote: |
Put a trace node after compute node and post the trace here. It would help us resolving the issue. |
this is the outputfrom the Trace ater compute node after commenting the type assigning codes.(Before HTTPRequestnode)
(
(0x01000000):Properties = (
(0x03000000):MessageSet = ''
(0x03000000):MessageType = ''
(0x03000000):MessageFormat = ''
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 819
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = FALSE
(0x03000000):CreationTime = GMTTIMESTAMP '2007-07-21 05:56:29.650'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
(0x03000000):ContentType = ''
)
(0x01000000):HTTPRequestHeader = (
(0x03000000):SOAPAction = ''
)
(0x01000010):XMLNS = (
(0x05000018): = (
(0x02000000): = ''
(0x06000011): = '1.0'
(0x06000012): = 'UTF-8'
)
(0x01000000)http://schemas.xmlsoap.org/soap/envelope/:Envelope = (
(0x07000012)xmlns:SOAP-ENV = 'http://schemas.xmlsoap.org/soap/envelope/'
(0x07000012)xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance'
(0x07000012)xmlns:xsd = 'http://www.w3.org/2001/XMLSchema'
(0x01000000)http://schemas.xmlsoap.org/soap/envelope/:Body = (
(0x01000000)http://customer/xsd:add = (
(0x07000012)xmlns:ns1 = 'customer'
(0x07000012)http://schemas.xmlsoap.org/soap/envelope/:encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'
(0x01000000):custBean = (
(0x01000000):cusId = (
(0x02000000): = '1000'
)
(0x01000000):pwd = (
(0x02000000): = 'Yellapu'
)
)
)
)
)
)
)
This is the trace i got from HTTPRequest node from error terminal Same error ,even if i give the Data type assisgn code
(
(0x01000000):myMQMD = (
(0x03000000):SourceQueue = 'WSIN'
(0x03000000):Transactional = TRUE
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 819
(0x03000000):Format = ' '
(0x03000000):Version = 2
(0x03000000):Report = 0
(0x03000000):MsgType = 8
(0x03000000):Expiry = -1
(0x03000000):Feedback = 0
(0x03000000):Priority = 0
(0x03000000):Persistence = 0
(0x03000000):MsgId = X'414d51205742524b365f44454641554c5480a14620001c02'
(0x03000000):CorrelId = X'000000000000000000000000000000000000000000000000'
(0x03000000):BackoutCount = 0
(0x03000000):ReplyToQ = ' '
(0x03000000):ReplyToQMgr = 'WBRK6_DEFAULT_QUEUE_MANAGER '
(0x03000000):UserIdentifier = 'MUSR_MQADMIN'
(0x03000000):AccountingToken = X'1601051500000080b1d65c83d32b85877f3f8df003000000000000000000000b'
(0x03000000):ApplIdentityData = ' '
(0x03000000):PutApplType = 28
(0x03000000):PutApplName = 'Websphere MQ Client for Java'
(0x03000000):PutDate = DATE '2007-07-21'
(0x03000000):PutTime = GMTTIME '05:56:29.650'
(0x03000000):ApplOriginData = ' '
(0x03000000):GroupId = X'000000000000000000000000000000000000000000000000'
(0x03000000):MsgSeqNumber = 1
(0x03000000):Offset = 0
(0x03000000):MsgFlags = 0
(0x03000000):OriginalLength = -1
)
(0x01000000):myProperties = (
(0x03000000):MessageSet = ''
(0x03000000):MessageType = ''
(0x03000000):MessageFormat = ''
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 819
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = FALSE
(0x03000000):CreationTime = GMTTIMESTAMP '2007-07-21 05:56:29.650'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
(0x03000000):ContentType = ''
)
(0x03000000):Var1 = '<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Header /><soapenv:Body><soapenv:Fault><soapenv:Code><soapenv:Value>soapenv:Sender</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">java.lang.StringIndexOutOfBoundsException: String index out of range: 0</soapenv:Text></soapenv:Reason><soapenv:Detail><Exception>org.apache.axis2.AxisFault: java.lang.StringIndexOutOfBoundsException: String index out of range: 0; nested exception is:
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:294)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:72)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:275)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(Unknown Source)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:183)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:254)
... 30 more
</Exception></soapenv:Detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>'
I got the SOAP message to invoke the service as below and this message successfully invoking the service.But my code also generating the sam SOAP message.
<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<add xmlns="http://customer/xsd">
<custBean>
<cusId>1000</cusId>
<pwd>Yellapu</pwd>
</custBean>
</add>
</soap:Body>
</soap:Envelope>
regards,
Tony |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Sat Jul 21, 2007 12:03 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
Hi,
I think first you should always check WebService to solve this problem.
You got response from WS with error stack trace.
Why don't you debug your WS code to check source of problem.
If you are saying you have working version of WS request just use TCPMonitor or another tool to compare these requests (working and not working).
Maybe they are different ?
PS. Check encoding in your code and working example (UTF-8 , UTF-16).
They are not the same. _________________ Marcin |
|
Back to top |
|
 |
mgk |
Posted: Sat Jul 21, 2007 12:35 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Hi, I've seen this error, and it is because Axis2 does not like a completely empty SOAPAction header. If you remove your code that is setting the SOAPAction to '' (empty string) the Request Node will automatically generate one for you that is "" (quote quote) if you select generate default headers on the node. Or you could change your code to set the SOAPAction to '""' (single quote, double quote, double quote, single quote).
Regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
tonythomasantony |
Posted: Sat Jul 21, 2007 4:27 am Post subject: |
|
|
Apprentice
Joined: 12 Aug 2006 Posts: 47
|
mgk wrote: |
Hi, I've seen this error, and it is because Axis2 does not like a completely empty SOAPAction header. If you remove your code that is setting the SOAPAction to '' (empty string) the Request Node will automatically generate one for you that is "" (quote quote) if you select generate default headers on the node. Or you could change your code to set the SOAPAction to '""' (single quote, double quote, double quote, single quote).
Regards, |
MGK,
error gone
i changed my SOAPAction to '""'.Now i am not getting any error expected result is not what i am getting.Below is the respone.
(
(0x01000000):Properties = (
(0x03000000):MessageSet = ''
(0x03000000):MessageType = ''
(0x03000000):MessageFormat = ''
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 1208
(0x03000000):Transactional = FALSE
(0x03000000):Persistence = FALSE
(0x03000000):CreationTime = GMTTIMESTAMP '2007-07-21 12:12:47.590'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
(0x03000000):ContentType = 'text/xml;charset=utf-8'
)
(0x01000000):HTTPRequestHeader = (
(0x03000000):Content-Length = '550'
(0x03000000):SOAPAction = '""'
(0x03000000):Content-Type = 'text/xml; charset=utf-8'
(0x03000000):Host = '9.184.2.56'
)
(0x01000000):HTTPResponseHeader = (
(0x03000000):X-Original-HTTP-Status-Line = 'HTTP/1.1 200 OK'
(0x03000000):X-Original-HTTP-Status-Code = 200
(0x03000000):Content-Type = 'text/xml;charset=utf-8'
(0x03000000):Date = 'Sat, 21 Jul 2007 12:20:16 GMT'
(0x03000000):Server = 'Apache-Coyote/1.1'
(0x03000000):Connection = 'close'
)
(0x01000010):XMLNS = (
(0x05000018):XML = (
(0x06000011): = '1.0'
(0x06000012): = 'utf-8'
)
(0x01000000)http://schemas.xmlsoap.org/soap/envelope/:Envelope = (
(0x07000012)xmlns:soapenv = 'http://schemas.xmlsoap.org/soap/envelope/'
(0x01000000)http://schemas.xmlsoap.org/soap/envelope/:Header =
(0x01000000)http://schemas.xmlsoap.org/soap/envelope/:Body = (
(0x01000000)http://customer/xsd:addResponse = (
(0x07000012):xmlns = 'http://customer/xsd'
(0x01000000)http://customer/xsd:return =
)
)
)
)
)
But i am expecting 4 String values.
I suppose communicate with WS MB developers may get only WSDL file.
I am creating the SOAP request only using this WSDL file in esql.
How can i confirm whether the problem from my side or WS side?
What is this
(0x07000012):xmlns = 'http://customer/xsd'
regards,
Tony |
|
Back to top |
|
 |
dilse |
Posted: Mon Jul 23, 2007 9:17 am Post subject: |
|
|
 Master
Joined: 24 Jun 2004 Posts: 270
|
Can you post us the request that you are sending to HTTPRequest node?
As per your WSDL
Quote: |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://customer/xsd"> |
"http://customer/xsd" is your target namespace. |
|
Back to top |
|
 |
tonythomasantony |
Posted: Tue Jul 24, 2007 3:01 am Post subject: |
|
|
Apprentice
Joined: 12 Aug 2006 Posts: 47
|
dilse wrote: |
Can you post us the request that you are sending to HTTPRequest node?
As per your WSDL
Quote: |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://customer/xsd"> |
"http://customer/xsd" is your target namespace. |
Hi all,
my problem got solved
i need to take care of 2 things ,
1. Setting the correct SOAPAction
2. Qualifying the fields with correct namespace declarations
my code changed as below,
--Create HTTPHeader for the message
SET OutputRoot.HTTPRequestHeader.SOAPAction='urn:add';
DECLARE mySoapNS NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE myXSI NAMESPACE 'http://www.w3.org/2001/XMLSchema-instance';
DECLARE myXSD NAMESPACE 'http://www.w3.org/2001/XMLSchema';
DECLARE myNS1 NAMESPACE 'http://customer/xsd';
DECLARE myNS NAMESPACE 'http://customer';
--XML Declarations
SET OutputRoot.XMLNS.(XML.XmlDecl) ='';
SET OutputRoot.XMLNS.(XML.XmlDecl).(XML.Version)='1.0';
SET OutputRoot.XMLNS.(XML.XmlDecl).(XML.Encoding)='UTF-8';
--Creating SOAP Envelope
SET OutputRoot.XMLNS.mySoapNS:Envelope.(XML.NamespaceDecl)xmlns:"SOAP-ENV" =
'http://schemas.xmlsoap.org/soap/envelope/' ;
SET OutputRoot.XMLNS.mySoapNS:Envelope.(XML.NamespaceDecl)xmlns:xsi =
'http://www.w3.org/2001/XMLSchema-instance' ;
SET OutputRoot.XMLNS.mySoapNS:Envelope.(XML.NamespaceDecl)xmlns:xsdd =
'http://www.w3.org/2001/XMLSchema' ;
-- Set the operation name and parameters
SET OutputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.myNS1:add.myNS1:custBean.myNS1:cusId ='1000';--SET
SET OutputRoot.XMLNS.mySoapNS:Envelope.mySoapNS:Body.myNS1:add.myNS1:custBean.myNS1:pwd ='Yellapu';--SET
SET OutputLocalEnvironment.Destination.HTTP.RequestURL = 'http://9.184.2.56:8080/axis2/services/CustomerService';
Thank you all for your valuable suggestions
regards,
Tony Thomas |
|
Back to top |
|
 |
|