Capture Request IP in Web Service
Hi,
Please let me know if we can able to capture the request IP inside web methods?
I am aware we can able to do this in Servlet request using HttpServletRequest.getRemoteAddr()
Is there is something similar to this in web service?
Thanks for your time.
Veera
if you use JAX-WS use WebServiceContext:
package wsdl;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.annotation.Resource;
@WebService()
public class MyWebService {
@Resource
private WebServiceContext wsContext;
@WebMethod(operationName = "GetInfo")
public Info GetInfo(
@WebParam(name = "Id") int Id,
@WebParam(name = "systemId") int systemId) {
Info i = null;
MessageContext mc = wsContext.getMessageContext();
HttpServletRequest request = ((javax.servlet.http.HttpServletRequest)mc.get(MessageContext.SERVLET_REQUEST));
String ip = request.getRemoteAddr();
/**code*/
return i;
}
Similar Messages
-
Is complex type request supported by web service data set?
I just installed OBIEE 11g and tried to create data models with web services. It works fine for web services that takes simple data types and returns complex data types. But if the request to the web service is a complex type, it doesn't work. On the Edit Data Set page, I selected "true" for Complex Type. After I entered WSDL url, it populated the Web Service dropdown, but not the Method dropdown. Any ideas?
The other problem I am having with web service data set is that it seems to ignore the attributes in the xml response. Only xml element is recognized.
e.g. in <trigger priority="0" font_size="0"/>, priority and font_size are ignored in the data set. Please advise. Thanks.Hi,
In this usecase , you can DnD the <serviceOperationName>_parameters as an ADF from. Then DnD the operation as a method. The methods input arg value is automatically set to the parameterIterator.currentRow.DataProvider. This works fine. -
Request handling in web service
Hi guys,
is there a way to "handle" the request within a web service (like HTTPrequest obj in servlets)? i.e. for retrieving the context and so on .. ?
thanks to anybody who will answer me
J.Hi guys,
is there a way to "handle" the request within a web
service (like HTTPrequest obj in servlets)? i.e. for
retrieving the context and so on .. ?
thanks to anybody who will answer me
J.See if this works for you. Have your service impl class also
implement javax.xml.rpc.server.ServiceLifecycle. Then you'll
have to add an init() and destroy() method (see the javadocs).
If you declare a ServletEndpointContext field, then in
init you can do
public void init(Object context) {
myServletEndpointContext = (ServletEndpointContext) context;
and in subsequent methods do
myHttpSession = servletEndpointContext.getHttpSession()
(don't do this part in init, do it during business method calls)
Cheers,
Bobby -
Unable to capture return values in web services api
At the time of login to web services if my server is down ,
it returns following error :
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1438)
at java.lang.String.substring(String.java:1411)
I want to capture this error so that i can try another server to login. how do i capture this error
Another place where i want to capture the return Value is when i look for a report on the server
rh = boBIPlatform.get("path://InfoObjects/Root Folder/"src_folder"/" + reportName +
"@SI_SCHEDULEINFO,SI_PROCESSINFO" ,oGetOptions);
oInfoObjects = rh.getInfoObjects();
CrystalReport = (CrystalReport)oInfoObjects.getInfoObject(0);
Here if the report is not there on the server , it returns a null handler exception.
but if i try catching it by checking my responsehandler is null like rh == null it does not catch it.
Any help will be appreciated
thanks
Rakesh GuptaTed : i have two cases
1) server = server_st.nextToken();
providerURL = "http://"server"/dswsbobje/services";
sessConnURL = new URL(providerURL + "/session");
Connection boConnection = new Connection(sessConnURL);
Session boSession = new Session(boConnection);
EnterpriseCredential boEnterpriseCredential = new EnterpriseCredential();
boEnterpriseCredential.setLogin(userid);
boEnterpriseCredential.setPassword(pwd);
boEnterpriseCredential.setAuthType(auth);
SessionInfo boSI = boSession.login(boEnterpriseCredential);
I have got a list of servers running web servcies stored in my tokens. when i pass the first server name say " test:8080" and that server is down , i want to catch somewhere in the code above that it did not get the connection so that i can loop back and try with the second server say test1:8080
This is for failover purposes.
at present when i was trying to capture return value of boSI it breaks giving the error
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1438)
at java.lang.String.substring(String.java:1411)
2nd case :
I am geeting reports from the server and scheduling them:
i run the following code which works fine if reports is there
rh = boBIPlatform.get("path://InfoObjects/Root Folder/"src_folder"/" + reportName +
"@SI_SCHEDULEINFO,SI_PROCESSINFO" ,oGetOptions);
oInfoObjects = rh.getInfoObjects();
CrystalReport = (CrystalReport)oInfoObjects.getInfoObject(0);
Here if the report is not there on the server then i should be able to catch from the response handle rh that it has got a null value.
but rh does not return a null value
the code ultimately throws a null handle at the following line
CrystalReport = (CrystalReport)oInfoObjects.getInfoObject(0);
i am not able to catch the null value there also.
hope you got my issue. -
Error with SOAP Request to calendar web service
Hi
I'm sending the following SOAP request to a calendar web service to create an appointment in the calendar. The response returns what seems to be a syntax error ("The Create method did not have a proper element in the request") but I can't see the cause of the fault. Any suggestions on what it may be? It's an 11g DB.
Many thanks
-x-POST-x-
POST /ocws-bin/ocas.fcgi HTTP/1.0
Content-Type: text/xml; charset="utf-8"
Content-Length: 993
SOAPAction: SOAPAction: "http://www.oracle.com/WebServices/Calendaring/1.0/Create"
Connection: close
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header><auth:BasicAuth xmlns:auth="http://soap-authentication.org/2002/01/">
<Name>CalendarName</Name><Password>CalendarPassword</Password>
</auth:BasicAuth> </SOAP-ENV:Header>
<SOAP-ENV:Body><cwsl:Create xmlns:cwsl="http://www.oracle.com/WebServices/Calendaring/1.0/"><CmdId>ITS APPOINTMENT</CmdId><iCalendar>
<vcalendar prodid="-//Oracle//Calendaring//Calendarlet//EN" version="2.0">
<vevent><class>PUBLIC</class>
<description>Calendar Body</description>
<dtstart value="DATE-TIME">20102905T120000</dtstart>
<duration>P00DT0H30M00S</duration>
<location>Location of user</location>
<summary>Incident ID - (name of user])</summary>
<uid>XGjRVnpReQALNsILlBlvcyXGCoUyXF</uid>
<x-oracle-eventtype>APPOINTMENT</x-oracle-eventtype>
<priority>5</priority>
</vevent>
</vcalendar>
</iCalendar></cwsl:Create></SOAP-ENV:Body></SOAP-ENV:Envelope>
-x-RESPONSE-x-
HTTP/1.1 500 Internal Server Error
Date: Thu, 27 May 2010 08:22:16 GMT
Server: Apache/2.2.4 (Unix) mod_ssl/2.2.4 OpenSSL/0.9.7a mod_fastcgi/2.4.6
OCAS-ProcTime: 407
Connection: close
Content-Type: text/xml; charset=utf-8
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server.Error::System::SOAPRequest</faultcode>
<faultstring>The Create method did not have a proper element in the request</faultstring>
<detail>
<cwsl:Error xmlns:cwsl="http://www.oracle.com/WebServices/Calendaring/1.0/">
<Class>Error::System::SOAPRequest</Class>
<Code>0020-00-00-00000034</Code>
<Line>3180</Line>
<FileName>SOAPRequestHandler.cpp,v</FileName>
<Version>1.57</Version>
<LastMod>2007/05/30 21:13:25</LastMod>
<Author>pscattol</Author>
<Date>Thu May 27 09:22:16 2010</Date>
<PID>26152</PID>
<TID>3044838304</TID>
<Level>Error</Level>
</cwsl:Error>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>Hi,
I am having problem using dii client, while sending a
request to c# webservice. error follows
QName QNAME_TYPE_STRING = new QName(NS_XSD,
"string");
call.setReturnType(QNAME_TYPE_STRING);
call.setOperationName(new QName(BODY_NAMESPACE_VALUE,
"GetDetails"));
call.addParameter("String_1", QNAME_TYPE_STRING,
ParameterMode.IN);Do you need another call to addParameter here?
String[] params = { "02", "2004" };
String result = (String)call.invoke(params); -
Request parameter of Web Service Data Control shows up as an Object
I have deployed a simple web service on a peoplesoft instance.
The request message is:
<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.example.org"
targetNamespace="http://www.example.org"
elementFormDefault="qualified">
<xsd:element name="SSR_CLASS_SEARCH_REQ">
<xsd:annotation>
<xsd:documentation>
A sample element
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="INSTITUTION" type="xsd:string" nillable="true"/>
<xsd:element name="TERM" type="xsd:string" nillable="true"/>
<xsd:element name="CAREER" type="xsd:string" nillable="true"/>
<xsd:element name="SUBJECT" type="xsd:string" nillable="true"/>
<xsd:element name="CLASS_NBR" type="xsd:int" nillable="true"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
While the response message has a depth of three levels:
In jdev 11g (Studio Edition Version 11.1.1.1.0, Build JDEVADF_11.1.1.1.0_GENERIC_090615.0017.5407) the one available for download on OTN, I perform the following steps.
Create a Web Service Data control using the WSDL url, generated from the PSFT end.
The Data control creates successfully. The problem is:
- In the service operation method (in the data control) the request parameter is shown as an Object.
- The entry under the service operation parameter tree, is 'paramater'
The data control looks like:
- <datacontrolname>
- <serviceOperationName>_parameters
- parameter
- CAREER
- CLASS_NBR
- INSTITUTION
- SUBJECT
- TERM
- <serviceOperationName>(Object)
- Parameters
- parameter
- Return
- <Return type>
The return type shows up fine, with collections in hierarchy of a depth of tree.
How do I create a parameter form for this data control.Hi,
In this usecase , you can DnD the <serviceOperationName>_parameters as an ADF from. Then DnD the operation as a method. The methods input arg value is automatically set to the parameterIterator.currentRow.DataProvider. This works fine. -
Problems with deep request structure in web service
I'm having problems when trying to consume an Enterprise Service-like web service in my Web Dynpro application. The web service FindXByElements has a request-structure as follows:
XByElementsQuery
-ProcessingConditions
-QueryHitsMaximumNumberValue
-QueryHitsUnlimitedIndicator
-XSelectionByElements
-ID
-Year
Regarding the structures on level two, the structure ProcessingConditions are of the global data type "WITHOUT_LASTRETURNED_QueryProcessingConditions" and are therefore typed. The structure XSelectionByElements on the other hand are just a "level" in the request structure and are therefore not typed. Both structures have occurrence 1 so they have to be filled with input data.
The code in wdDoInit in the Component Controller looks like this:
QueryXInModel model = new QueryXInModel();
wdContext.nodeRequest_FindXByElements().bind(wdContext.createRequest_FindXByElementsElement(new Request_FindXByElements(model)));
wdContext.currentRequest_FindXByElementsElement().modelObject().setXByElementsQuery(new XByElementsQuery_Sync(model));
//Processing structure
wdContext.currentXByElementsQueryElement().modelObject().setProcessingConditions(new WITHOUT_LASTRETURNED_QueryProcessingConditions(model));
//Selection structure
wdContext.currentXByElementsQueryElement().modelObject().setXSelectionByElements(new XSelectionByElements(model));
The last row generates the following exception:
java.lang.IllegalArgumentException: Cannot perform write operation 'setRelatedModelObject' on target role: Class 'XSelectionByElements' is not compatible to class '$002fWsdlDefinitions$002fWsdlTypes$002fXsdSchema$002fXsdComplexType$005b3$005d$002fXsdSequence$002fXsdElement$005b2$005d$002fXsdComplexType' of target role 'XSelectionByElements' in model class 'XByElementsQuery_Sync'
There seems to be a problem to bind a non-typed structure element to a context node since the processing structure is working fine but the selection structure are not.
What am I doing wrong, anyone got any clues?
/OskarHi
QueryXInModel model = new QueryXInModel();
wdContext.nodeRequest_FindXByElements().bind(wdContext.createRequest_FindXByElementsElement(new Request_FindXByElements(model)));
wdContext.currentRequest_FindXByElementsElement().modelObject().setXByElementsQuery(new XByElementsQuery_Sync(model));
//Processing structure
wdContext.currentXByElementsQueryElement().modelObject().setProcessingConditions(new WITHOUT_LASTRETURNED_QueryProcessingConditions(model));
//Selection structure
wdContext.currentXByElementsQueryElement().modelObject().setXSelectionByElements(new XSelectionByElements(model));
XByElementsQuery
ProcessingConditions
QueryHitsMaximumNumberValue
QueryHitsUnlimitedIndicator
XSelectionByElements
ID
Year
as
QueryXInModel model = new QueryXInModel();
Request_FindXByElement request = new Requst_FindXByElement();
ProcessCondition processCond = new ProcessCondition(model);
QueryHitsMaximumNumberValue qhMaxNumValues = QueryHitsMaximumNumberValue(model);
QueryHitsUnlimitedIndicator qhUnLimind = new QueryHitsUnlimitedIndicator(model);
XSelectionByElements selecByEle = new XSelectionByElements(model);
processCond.set....();
qhMaxNumValues .set...();
and so on
request.set....();
wdcontext.nodeReqestFindX..bind(request);
in the above during the values you will automatically get the set values . -
AE 5.2 - Request Creation via Web Service
Hi there,
did anyone create a request via WebService requesting more than one system (applications) yet?
We did not find a way of transferring multiple systems.
Also there is no way to transfer the user validity dates. Is this really not possible?
I've checked 5.3 Web Services and they look exactly the same (they've just been renamed, but no improvement regarding additional fields).
Currently we are on 5.2 SP8 Patch1.
Thanks,
DanielaThe GetSubmitRequest will accept:
getSubmitRequest
RequestDetailsData_1 (test.types.RequestDetailsData) NULL
priority (String) SKIP
location (String) SKIP
locale (String) SKIP
application (String) SKIP
userId (String) SKIP
company (String) SKIP
department (String) SKIP
emailAddress (String) SKIP
employeeType (String) SKIP
firstName (String) SKIP
lastName (String) SKIP
mgrEmailAddress (String) SKIP
mgrFirstName (String) SKIP
mgrId (String) SKIP
mgrLastName (String) SKIP
requestorEmailAddress (String) SKIP
requestorFirstName (String) SKIP
requestorId (String) SKIP
requestorLastName (String) SKIP
requestReason (String) SKIP
requestType (String) SKIP
roles (test.types.RoleData[]) SKIP
element1 (test.types.RoleData) NULL
action (String) SKIP
company (String) SKIP
roleId (String) SKIP
sysId (String) SKIP
validFrom (java.util.GregorianCalendar) SKIP
validTo (java.util.GregorianCalendar) SKIP
telephone (String) SKIP
customField (test.types.CustomFieldsDTO[]) SKIP
element1 (test.types.CustomFieldsDTO) NULL
name (String) SKIP
value (String) SKIP
Ankur
GRC Consultant -
Can't find where to update SOAP header request on a Web Service
Hello,
I am consuming a certain Web Service from a remote Server and succefully created a client proxy for it.
This Web Service requires a String parameter (which is the licence key) to be inserted in the SOAP request header. I've searched at the client proxy I created under Virtual Interface, Web Service Definition and under Web Service Configuration but couldn't find an option which allows me to modify the SOAP header request.
At this link:
http://help.sap.com/saphelp_nw04/helpdata/EN/a2/99af4e693dee43a0519e029549647b/content.htm
There is an explanation on how to transfer existing request parameters from the SOAP body to the SOAP header, but I want to add the header new parameter except the exsiting parameters the Web Service request expects.
I can of course write the request myself but than I loose the whole wizard advantage...
Can someone please tell me where can I find it?
RoyRalph Landry1, your link just sends them to the links I provided.
If you have an iPod touch:
For Windows: See iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows
For Mac OS X: See iPhone, iPad, iPod touch: Device not recognized in iTunes for Mac OS X -
Problem requesting WSDL from web service.
Hello,
I am rather new to creating web services, but I have been writing software for some time now. Please be gentle.
I am writing a webservice "document first". I have a schema and an WSDL that were already written. I generated the code for a server from the WSDL and then wrote an implementing class from the interface it generated. All of my actual code compiles successfully and unit tests okay.
I then looked at one of the examples included with JAX-WS to find out how to create the war to deploy to an application server (I am using Tomcat 5.5). After modifying the web.xml, build.xml, and sun-jaxws.xml files to work with my project structure I built and deployed the webservice.
My problem is tomcat shows it is running, but when ever I try to point my client where I think the WSDL should be the "resource insn't available" I tried curl and just browsing there as well. What is the URI to retrieve the WSDL?
Thanks for all your help in advance.
Edited by: blindingillusion on Jun 5, 2008 1:10 PMHi,
I'm also new to web services. I created a hello world web service in MyEclipse using the wizard. How I pointed to the WSDL was by typing the following:
http://localhost:8080/WebServiceProject/services/HelloWorldService?WSDL -
Error while sending a rpc request to c# web service
Hi,
I am having problem using dii client, while sending a request to c# webservice. error follows
run-client:
[java] Endpoint address = http://localhost/webservice/default.asmx
[java] expected 1 parameter(s) but received: 2. Expected parameters:
[java] String_2:{http://www.w3.org/2001/XMLSchema}string Got parameters:
[java] java.lang.String
[java] java.lang.String
[java] at com.sun.xml.rpc.encoding.soap.SOAPRequestSerializer.checkPara
meterListLength(SOAPRequestSerializer.java:265)
[java] at com.sun.xml.rpc.encoding.soap.SOAPRequestSerializer.doSeriali
zeInstance(SOAPRequestSerializer.java:109)
[java] at com.sun.xml.rpc.encoding.ObjectSerializerBase.serialize(Objec
tSerializerBase.java:102)
[java] at com.sun.xml.rpc.client.StreamingSender._writeRequest(Streamin
gSender.java:473)
[java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.
java:59)
[java] at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvok
erImpl.java:61)
[java] at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:35
3)
[java] at testmsws.HelloClient.main(Unknown Source)
the c# webmethod requires 2 input parametes. I set 2 parameters to call and invoking method
QName QNAME_TYPE_STRING = new QName(NS_XSD, "string");
call.setReturnType(QNAME_TYPE_STRING);
call.setOperationName(new QName(BODY_NAMESPACE_VALUE, "GetDetails"));
call.addParameter("String_1", QNAME_TYPE_STRING, ParameterMode.IN);
String[] params = { "02", "2004" };
String result = (String)call.invoke(params);
please give me a hand here if anybody know how to resolve this error
thanks
chandraHi,
I am having problem using dii client, while sending a
request to c# webservice. error follows
QName QNAME_TYPE_STRING = new QName(NS_XSD,
"string");
call.setReturnType(QNAME_TYPE_STRING);
call.setOperationName(new QName(BODY_NAMESPACE_VALUE,
"GetDetails"));
call.addParameter("String_1", QNAME_TYPE_STRING,
ParameterMode.IN);Do you need another call to addParameter here?
String[] params = { "02", "2004" };
String result = (String)call.invoke(params); -
SOAP-Request to external Web Service Failed with GENERAL_ERROR PART UKNOWN
Hi,
i have generated a Consumer Proxy with the following WSDL File:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Mit XMLSpy v2010 rel. 2 (http://www.altova.com) von Ralph Rothe (n/a) bearbeitet -->
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://new.webservice.namespace" targetNamespace="http://new.webservice.namespace">
<wsdl:types>
<xs:schema targetNamespace="http://new.webservice.namespace" elementFormDefault="qualified"/>
</wsdl:types>
<wsdl:message name="greetAnfrage">
<wsdl:part name="user" type="xs:string"/>
</wsdl:message>
<wsdl:message name="greetAntwort">
<wsdl:part name="return" type="xs:string"/>
</wsdl:message>
<wsdl:portType name="TestServerPortType">
<wsdl:operation name="getResults">
<wsdl:input message="tns:greetAnfrage"/>
<wsdl:output message="tns:greetAntwort"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="TestServerBinding" type="tns:TestServerPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getResults">
<soap:operation soapAction="urn:#NewOperation" style="rpc"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="TestServerService">
<wsdl:port name="TestServerPort" binding="tns:TestServerBinding">
<soap:address location="http://92.79.135.41/soap/server.php"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
If i testing the Error "GENERAL ERROR - PART UNKNOWN (NULL) occur. A payload trace with SRT_UTIL i show a correct response.Hi,
i have generated a Consumer Proxy with the following WSDL File:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Mit XMLSpy v2010 rel. 2 (http://www.altova.com) von Ralph Rothe (n/a) bearbeitet -->
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://new.webservice.namespace" targetNamespace="http://new.webservice.namespace">
<wsdl:types>
<xs:schema targetNamespace="http://new.webservice.namespace" elementFormDefault="qualified"/>
</wsdl:types>
<wsdl:message name="greetAnfrage">
<wsdl:part name="user" type="xs:string"/>
</wsdl:message>
<wsdl:message name="greetAntwort">
<wsdl:part name="return" type="xs:string"/>
</wsdl:message>
<wsdl:portType name="TestServerPortType">
<wsdl:operation name="getResults">
<wsdl:input message="tns:greetAnfrage"/>
<wsdl:output message="tns:greetAntwort"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="TestServerBinding" type="tns:TestServerPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getResults">
<soap:operation soapAction="urn:#NewOperation" style="rpc"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="TestServerService">
<wsdl:port name="TestServerPort" binding="tns:TestServerBinding">
<soap:address location="http://92.79.135.41/soap/server.php"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
If i testing the Error "GENERAL ERROR - PART UNKNOWN (NULL) occur. A payload trace with SRT_UTIL i show a correct response. -
WEB SERVICE + REQUEST RESPONSE TRACK
Hello Friends,
I have a issue, I have to consume the webservice made in .NET environment. The web service uses oasis security. so I have to set the SOAP HEADER with user name and passwrod. Unfortunately its not working. My question is , is there any way that one can track the request response... Can I see, how my request packet looks like when it reaches to server ?
Any help will be gr8.
Regards,Hi Raja,
Okey, now I will first paste the request formate which web service is expecting, and then I will paste my code, might be you have hint for me.....
POST /alertservice.asmx HTTP/1.1
Host: desktopalert
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://service.desktopalert.net/AlertService.asmx/CreateAlert"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-386451">
<wsse:Username>someuser</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">ILReFb7Uz57eNwgJXjj9S086aAw=</wsse:Password>
<wsse:Nonce>jHgxoLOr9RzHpALQRark7Q==</wsse:Nonce>
<wsu:Created>2007-02-11T23:34:23.027Z</wsu:Created>
</wsse:UsernameToken>
<wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-24470798">
<wsu:Created>2007-02-11T23:34:22.996Z</wsu:Created>
<wsu:Expires>2007-02-11T23:39:22.996Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</soapenv:Header>
<soap:Body>
<CreateAlert xmlns="http://service.desktopalert.net/AlertService.asmx">
<content>string</content>
<title>string</title>
<height>int</height>
<width>int</width>
<PublishDate>dateTime</PublishDate>
<ExpireDate>dateTime</ExpireDate>
<groupids>
<int>int</int>
<int>int</int>
</groupids>
</CreateAlert>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
My code ( SOAP HEADER AND SOAP BODY ):
CONCATENATE
'<?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:xsi="http://www.w3.org/2001/XMLSchema-instance">'
' <soapenv:Header>'
' <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">'
' <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-11072909">'
' <wsse:Username>admin</wsse:Username>'
' <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">ISMvKXpXpadDiUoOSoAfww==</wsse:Password>'
' <wsse:Nonce>WL4S/89uFlsVZ+Ys73fTNQ==</wsse:Nonce>'
' <wsu:Created>2007-03-27T14:34:23.199Z</wsu:Created>'
' </wsse:UsernameToken>'
' <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-12203633">'
' <wsu:Created>2007-03-27T14:34:23.184Z</wsu:Created>'
' <wsu:Expires>2007-03-27T14:39:23.184Z</wsu:Expires>'
' </wsu:Timestamp>'
' </wsse:Security>'
' </soapenv:Header>'
'<soap:Body>'
' <CreateAlert xmlns="http://service.desktopalert.net/AlertService.asmx" /> '
' <content>teststring</content>'
' <title>teststring</title>'
' <height>300</height>'
' <width>300</width>'
' <PublishDate> 27.03.2007 16:08:18</PublishDate>'
' <ExpireDate>30.03.2007 10:00:18</ExpireDate>'
' <groupids>'
' <int>1</int>'
' <int>1</int>'
' </groupids>'
' </CreateAlert>'
' </soap:Body>'
'</soapenv:Envelope>'
INTO WF_STRING.
And if any one of the parameter is wrong, still I am expecting that, my data reached till database, or if I am doing something wrong, then some exception, error, has to come ? right...
Regards, -
Null Values From MS Web Services Toolkit Client
Hi,
I've been bashing my head against a wall on this one for too long now.
I've got a JAX-WS web service deployed to Glassfish v2 b33 which works fine when called by a Java client. It also works fine when methods with no parameters are called from the MS client, i.e. simple and complex types are returned as they should be. However the problem I am having is that when the web service methods that take parameters are called from the MS client, the values received by the service are always null. I've montitored the service and values are being sent in the soap request, but a simple System.out.println statement in the first line of the method indicates a null value. I've captured a request from the Java client and the MS client to show the difference:
A java request:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header/>
<soapenv:Body>
<ns0:getConfig xmlns:ns0="http://ws.firestorm.alternativenetworks.com/">
<arg0>Inbound</arg0>
</ns0:getConfig>
</soapenv:Body>
</soapenv:Envelope>and a request from the web services toolkit:
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAPSDK4:getConfig xmlns:SOAPSDK4="http://ws.firestorm.alternativenetworks.com/">
<SOAPSDK4:arg0>Inbound</SOAPSDK4:arg0>
</SOAPSDK4:getConfig>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>I've tried everything I can think of, including changing the style from RPC/LITERAL to DOCUMENT/LITERAL, but the Java web service just seem to like the way the SOAP message is wrapped up.
Any help on this would be greatly appreciated.
Cheers
TonyThanks Milan, your suggestion put me on the right track, however I've hit another snag.
I decided the best way to solve the problem was to use the Glassfish Transformation Rules feature to take the SOAP request and transform it to a valid format before reaching the code. The XSLT file I created looks like this (I'm no XSLT guru so this will definitely need some tidying up, but for now it works): <?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="*">
<xsl:copy><xsl:copy-of select="@*"/><xsl:apply-templates/></xsl:copy>
</xsl:template>
<xsl:template match="/SOAP-ENV:Envelope/SOAP-ENV:Body/*">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:for-each select="*">
<xsl:text disable-output-escaping="yes"><arg</xsl:text>
<xsl:value-of select="position() - 1"/>
<xsl:text disable-output-escaping="yes">></xsl:text>
<xsl:value-of select="."/>
<xsl:text disable-output-escaping="yes"></arg</xsl:text>
<xsl:value-of select="position() - 1"/>
<xsl:text disable-output-escaping="yes">></xsl:text>
</xsl:for-each>
</xsl:copy>
</xsl:template>
</xsl:stylesheet> which transforms the problem SOAP request: <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAPSDK4:getConfig xmlns:SOAPSDK4="http://ws.firestorm.alternativenetworks.com/">
<SOAPSDK4:arg0>Inbound</SOAPSDK4:arg0>
</SOAPSDK4:getConfig>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope> to the following valid format: <?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAPSDK4:getConfig xmlns:SOAPSDK4="http://ws.firestorm.alternativenetworks.com/">
<arg0>Inbound</arg0>
</SOAPSDK4:getConfig>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope> But when I load the .xsl file using the Transformation Rules page and call the web service using the Microsoft Web Services Toolkit, I'm getting the following exception: [#|2007-05-11T09:23:46.530+0100|INFO|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=15;_ThreadName=Thread-15;com.sun.enterprise.admin.event.wsmgmt.TransformationRuleEvent -- server [1 Change(s), Id:1, ts:1178871826530];|ADM1041:Sent the event to instance:[com.sun.enterprise.admin.event.wsmgmt.TransformationRuleEvent -- server [1 Change(s), Id:1, ts:1178871826530]]|#]
[#|2007-05-11T09:27:31.675+0100|INFO|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=12;_ThreadName=httpWorkerThread-4848-0;com.sun.enterprise.admin.event.wsmgmt.TransformationRuleEvent -- server [1 Change(s), Id:2, ts:1178872051675];|ADM1041:Sent the event to instance:[com.sun.enterprise.admin.event.wsmgmt.TransformationRuleEvent -- server [1 Change(s), Id:2, ts:1178872051675]]|#]
[#|2007-05-11T09:28:00.269+0100|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=13;_ThreadName=httpSSLWorkerThread-8080-0;_RequestID=89eadb09-2894-4ace-95f6-75043c1e6988;|
ERROR: ''|#]
[#|2007-05-11T09:28:00.285+0100|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=13;_ThreadName=httpSSLWorkerThread-8080-0;_RequestID=89eadb09-2894-4ace-95f6-75043c1e6988;|
com.sun.enterprise.admin.wsmgmt.transform.TransformException: javax.xml.transform.TransformerException: java.lang.NullPointerException
at com.sun.enterprise.admin.wsmgmt.transform.FilterChain.process(FilterChain.java:238)
at com.sun.enterprise.admin.wsmgmt.transform.TransformFilter.process(TransformFilter.java:144)
at com.sun.enterprise.admin.wsmgmt.filter.spi.FilterRouter.applyFilters(FilterRouter.java:69)
at com.sun.enterprise.admin.wsmgmt.agent.GlobalMessageListenerImpl.processRequest(GlobalMessageListenerImpl.java:181)
at com.sun.enterprise.webservice.monitoring.WebServiceEngineImpl.processRequest(WebServiceEngineImpl.java:265)
at com.sun.enterprise.webservice.monitoring.JAXWSEndpointImpl.processRequest(JAXWSEndpointImpl.java:53)
at com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:127)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:79)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:70)
at com.sun.xml.ws.mex.server.MetadataServerPipe.process(MetadataServerPipe.java:97)
at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:191)
at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:113)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:79)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:208)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:374)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:175)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:134)
at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:100)
at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:74)
at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:187)
at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:116)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:101)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:207)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:249)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:618)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:549)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:790)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:248)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:199)
at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:328)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:93)
Caused by: javax.xml.transform.TransformerException: java.lang.NullPointerException
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:651)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:281)
at com.sun.enterprise.admin.wsmgmt.transform.FilterChain.process(FilterChain.java:224)
... 54 more
Caused by: java.lang.NullPointerException
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1235)
at com.sun.org.apache.xalan.internal.xsltc.trax.TrAXFilter.parse(TrAXFilter.java:105)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:588)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:642)
... 56 moreCould this be a bug or am I doing something wrong?
Cheers again,
Tony -
Call thirty party java web service but always return null
hi
I call a java web service in my application visual studio 2008 c#, but always return NULL.
I used Tool Fiddler to monitor the traffic between my client and the web service server, it showed the return is not Null.
Here is my code, please see if anything I do wrong.
namespace CanOfficer_THQ_vs_IHQ.TestWebReferenceAppointment {
using System.Diagnostics;
using System.Web.Services;
using System.ComponentModel;
using System.Web.Services.Protocols;
using System;
using System.Xml.Serialization;
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="AppointmentServiceSoapBinding", Namespace="http://service.ips.salvationarmy.org/")]
public partial class AppointmentService : Microsoft.Web.Services3.WebServicesClientProtocol {
private System.Threading.SendOrPostCallback deleteAppOperationCompleted;
private System.Threading.SendOrPostCallback importAppOperationCompleted;
private System.Threading.SendOrPostCallback editAppOperationCompleted;
private bool useDefaultCredentialsSetExplicitly;
/// <remarks/>
public AppointmentService() {
this.Url = global::CanOfficer_THQ_vs_IHQ.Properties.Settings.Default.CanOfficer_THQ_vs_IHQ_TestWebReferenceAppointment_AppointmentService;
if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
this.UseDefaultCredentials = true;
this.useDefaultCredentialsSetExplicitly = false;
else {
this.useDefaultCredentialsSetExplicitly = true;
public new string Url {
get {
return base.Url;
set {
if ((((this.IsLocalFileSystemWebService(base.Url) == true)
&& (this.useDefaultCredentialsSetExplicitly == false))
&& (this.IsLocalFileSystemWebService(value) == false))) {
base.UseDefaultCredentials = false;
base.Url = value;
public new bool UseDefaultCredentials {
get {
return base.UseDefaultCredentials;
set {
base.UseDefaultCredentials = value;
this.useDefaultCredentialsSetExplicitly = true;
/// <remarks/>
public event deleteAppCompletedEventHandler deleteAppCompleted;
/// <remarks/>
public event importAppCompletedEventHandler importAppCompleted;
/// <remarks/>
public event editAppCompletedEventHandler editAppCompleted;
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute(
RequestNamespace="http://service.ips.salvationarmy.org/",
ResponseNamespace="http://service.ips.salvationarmy.org/",
Use=System.Web.Services.Description.SoapBindingUse.Encoded,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
[return: System.Xml.Serialization.XmlElementAttribute("return", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string deleteApp([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] int id) {
object[] results = this.Invoke("deleteApp", new object[] {
id});
return ((string)(results[0]));
/// <remarks/>
public void deleteAppAsync(int id) {
this.deleteAppAsync(id, null);
/// <remarks/>
public void deleteAppAsync(int id, object userState) {
if ((this.deleteAppOperationCompleted == null)) {
this.deleteAppOperationCompleted = new System.Threading.SendOrPostCallback(this.OndeleteAppOperationCompleted);
this.InvokeAsync("deleteApp", new object[] {
id}, this.deleteAppOperationCompleted, userState);
private void OndeleteAppOperationCompleted(object arg) {
if ((this.deleteAppCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.deleteAppCompleted(this, new deleteAppCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute(
RequestNamespace="http://service.ips.salvationarmy.org/",
ResponseNamespace="http://service.ips.salvationarmy.org/",
Use=System.Web.Services.Description.SoapBindingUse.Encoded,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
[return: System.Xml.Serialization.XmlElementAttribute("return", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string importApp(
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] int person,
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string name,
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string territory,
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string location,
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] bool primary,
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] Nullable<System.DateTime> start,
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] Nullable<System.DateTime> end,
[System.Xml.Serialization.XmlElementAttribute("categories", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string[] categories) {
object[] results = this.Invoke("importApp", new object[] {
person,
name,
territory,
location,
primary,
start,
end,
categories});
return ((string)(results[0]));
/// <remarks/>
public void importAppAsync(int person, string name, string territory, string location, bool primary, Nullable<System.DateTime> start, Nullable<System.DateTime> end, string[] categories) {
this.importAppAsync(person, name, territory, location, primary, start, end, categories, null);
/// <remarks/>
public void importAppAsync(int person, string name, string territory, string location, bool primary, Nullable<System.DateTime> start, Nullable<System.DateTime> end, string[] categories, object userState) {
if ((this.importAppOperationCompleted == null)) {
this.importAppOperationCompleted = new System.Threading.SendOrPostCallback(this.OnimportAppOperationCompleted);
this.InvokeAsync("importApp", new object[] {
person,
name,
territory,
location,
primary,
start,
end,
categories}, this.importAppOperationCompleted, userState);
private void OnimportAppOperationCompleted(object arg) {
if ((this.importAppCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.importAppCompleted(this, new importAppCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute(
RequestNamespace="http://service.ips.salvationarmy.org/",
ResponseNamespace="http://service.ips.salvationarmy.org/",
Use=System.Web.Services.Description.SoapBindingUse.Encoded,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
[return: System.Xml.Serialization.XmlElementAttribute("return", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string editApp(
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] int id,
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string name,
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string territory,
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string location,
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] bool primary,
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] Nullable<System.DateTime> start,
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] Nullable<System.DateTime> end,
[System.Xml.Serialization.XmlElementAttribute("categories", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string[] categories) {
object[] results = this.Invoke("editApp", new object[] {
id,
name,
territory,
location,
primary,
start,
end,
categories});
return ((string)(results[0]));
/// <remarks/>
public void editAppAsync(int id, string name, string territory, string location, bool primary, Nullable<System.DateTime> start, Nullable<System.DateTime> end, string[] categories) {
this.editAppAsync(id, name, territory, location, primary, start, end, categories, null);
/// <remarks/>
public void editAppAsync(int id, string name, string territory, string location, bool primary, Nullable<System.DateTime> start, Nullable<System.DateTime> end, string[] categories, object userState) {
if ((this.editAppOperationCompleted == null)) {
this.editAppOperationCompleted = new System.Threading.SendOrPostCallback(this.OneditAppOperationCompleted);
this.InvokeAsync("editApp", new object[] {
id,
name,
territory,
location,
primary,
start,
end,
categories}, this.editAppOperationCompleted, userState);
private void OneditAppOperationCompleted(object arg) {
if ((this.editAppCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.editAppCompleted(this, new editAppCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
/// <remarks/>
public new void CancelAsync(object userState) {
base.CancelAsync(userState);
private bool IsLocalFileSystemWebService(string url) {
if (((url == null)
|| (url == string.Empty))) {
return false;
System.Uri wsUri = new System.Uri(url);
if (((wsUri.Port >= 1024)
&& (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
return true;
return false;
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
public delegate void deleteAppCompletedEventHandler(object sender, deleteAppCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class deleteAppCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal deleteAppCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
/// <remarks/>
public string Result {
get {
this.RaiseExceptionIfNecessary();
return ((string)(this.results[0]));
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
public delegate void importAppCompletedEventHandler(object sender, importAppCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class importAppCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal importAppCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
/// <remarks/>
public string Result {
get {
this.RaiseExceptionIfNecessary();
return ((string)(this.results[0]));
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
public delegate void editAppCompletedEventHandler(object sender, editAppCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class editAppCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal editAppCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
/// <remarks/>
public string Result {
get {
this.RaiseExceptionIfNecessary();
return ((string)(this.results[0]));Hi;
I used Fiddler to monitor the process, and it showed the request sent thru web service worked and returned a value, but in my .Net application the return captured as NULL. Could you please look into the code above and the result from Filddler and see if
you can help.
thank you.
REQUEST:
POST https://159.253.140.178/services/AppointmentService HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.4252)
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Host: 159.253.140.178
Content-Length: 1589
Expect: 100-continue
Connection: Keep-Alive
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://service.ips.salvationarmy.org/" xmlns:types="http://service.ips.salvationarmy.org/encodedTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
<soap:Header>
<wsse:Security mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>
[email protected]
</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">
tpi4IPSws!
</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soap:Header>
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:importApp>
<person xsi:type="xsd:int">
169275
</person>
<name xsi:type="xsd:string">
Corps Officer (Cahul-Russia) Test12
</name>
<territory xsi:type="xsd:string">
CAN
</territory>
<location xsi:type="xsd:string">
TEST LOCATION 12
</location>
<primary xsi:type="xsd:boolean">
true
</primary>
<start xsi:type="xsd:dateTime">
2013-05-30T00:00:00
</start>
<end xsi:type="xsd:dateTime">
2014-06-04T00:00:00
</end>
<categories href="#id1" />
</tns:importApp>
<soapenc:Array id="id1" soapenc:arrayType="xsd:string[1]">
<Item>
vpsCat1
</Item>
</soapenc:Array>
</soap:Body>
</soap:Envelope>
RESPONSE:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=UTF-8
Content-Length: 232
Date: Fri, 05 Sep 2014 19:45:22 GMT
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:importAppResponse xmlns:ns2="http://service.ips.salvationarmy.org/">
<return>
OK_572463
</return>
</ns2:importAppResponse>
</soap:Body>
</soap:Envelope>
Maybe you are looking for
-
I would like to add a button to the TestStand (v3.5) operator interface Full OI-TopLevelVI. What we want to do is have this toggle (off/on) indicate whether we're in a special debug mode or not. I want to do two things (1) grey out the button if th
-
Using InputMap and ActionMap to detect any key pressed...plz help
Hi, I am quite new to Java. I have a tiny problem. I wanna put an actionlistener into a JTextField, so it printout something whenever a key is pressed (when the textField is selected). I can only get it to print if I assign a specific key to pressed.
-
Can't sync bluetooth with my macbook pro?
I get to the screen and make the iphone discoverable the macbook sees it then it fails to get the phone to open up to being able to enter the code.. I have tried a bunch of times. what am I doind wrong?
-
Some database applications might still be running
Hi All I've installed Enterprise Portal 7 on Red Hat Enterprise Linux Server release 5.4. where 5 other sap instances are installed all running on sapdb 7.7 I had to uninstall the portal and on reinstalling I had to remove entries from /sapdb/data/c
-
AnyConnect 2.5 - Client-to-client connectivity: Intra-interface configuration
I'm working with AnyConnect for the first time (my prior experience is with IPSec client) and I have multiple remote users who connect to a 5520 via AnyConnect client; they need to print to each others' shared printers but currently have no connectiv