Hi I am calling the pub.client:http with the following inputs. I have three cases here
1) input with only string variable
1.1.In this i have given the URL as http://localhost:6666/invoke/Test.http:testHTTP(This is the target service I am invoking through http) , method as post and load as bytes are the inputs to http
1.2. I have passed the mapped the variable input to data/string.
1.3. In the target i have service i.e. testHTTP i have just called debugLog service with the message as %input%
1.4. After running the HTTP service the result is null. I am not sure why i didnt hardcode the value of headers/content-type as text/xml also.
1.5. To solve the above i have mapped “input” varible to data/args and after running the http service it is working fine. Here to i didnt hardcode the value of headers
Can you let me know if the above approach is correct.
2) Input with document and has fields like string,stringlist.
2.1.In this i have given the URL as http://localhost:6666/invoke/Test.http:testHTTP_1(This is the target service I am invoking through http) , method as post and load as bytes are the inputs to http
2.2. I have passed the mapped the variable input to data/string.
2.3. In the target i have service i.e. testHTTP_1 i have just called debugLog service with the message as %input%
2.4. After running the HTTP service the result is null. I am not sure why i didnt hardcode the value of headers/content-type as text/xml also.
2.5. To solve the above i have mapped “input”, stringList to data/args and after running the http service it is working fine. Here to i didnt hardcode the value of headers
Can you let me know if the above approach is correct.
3) Passing xml data
3.1.In this i have given the URL as http://localhost:6666/invoke/Test.http:testHTTP_2(This is the target service I am invoking through http) , method as post and load as bytes are the inputs to http
3.2. I have passed the mapped the variable input to data/string.
3.3. In the target i have service i.e. testHTTP_2 i have just called xmlStringToNode and NodeToDocument service and at the end i have placed debug Log to print the values in document as %document/Student/Name%**%document/Student/RollNo%
3.4. After running the HTTP service the result is null. I am not sure why i didnt hardcode the value of headers/content-type as text/xml also.
3.5. To solve the above i have mapped “input”, to data/args and after running the http service it is working fine. Here to i didnt hardcode the value of headers
Can you let me know if the above approach is correct.
Thanks
Abhijith