Hi Everybody;
Firstof all Thanks for your interest to my problem. I attach my test
wsdl file,services.xml and my class . the handling class is under
tr\com\cs\banking\in=
frastructure\bankingextensions\webservice\handler and it is CSBankingWS
I also send the code for that class . This class needs libraries like
log4j,axiom-api etc. so should I put them in a lib folder within my aar.I can
not load my class unfortunetly with the wizard. (I do not know why?) So I aar
them up manually
Thanks again
Ibrahim DEMIR
CyberSoft Yazilim Muh.
http://www.ibrahimdemir.org
----- Original Message ----
From: keith chapman <[EMAIL PROTECTED]>
To: [email protected]
Sent: Tuesday, October 7, 2008 5:12:53 AM
Subject: Re: Tired of aar problem
On Tue, Oct 7, 2008 at 3:04 AM, ibrahim demir <[EMAIL PROTECTED]> wrote:
Hi All;
I have been trying to generate an aar file and deploy it within my war
file.Everthing deploys well and when I use the axis2 web interface I can see my
service. But when I send a request from .NET Wweb Service Studio:
System.Reflection.TargetInvocationException: Exception has been thrown by the
target of an invocation. ---> System.Web.Services.Protocols.SoapException: The
ServiceClass object does not implement the required method in the following
form: OMElement call(OMElement e)
But my service class object is exactly the same..Before sending my wsdl file
and aar I have a few questions
1-while creating my aar should I put the used libraries in a folder called lib
You could, if you want to make those jars available to this service only. But
this is not an absolute necessity if the classes are not in the lib of the
service archive it will be picked off the main lib.
2- when I try to create my aar with Eclipse Axis Archiver Plugin but I can not
load my class ..So can this a sign that there something wrong
3-My axis2 container is 1.3 verison and I write my services using 1.4.1 libs.
Can this cause a problem.
Should not be an issue. There are no API changes.
Thanks,
Keith.
I can send more information if you are interested.
Yours and thanks
Ibrahim DEMIR
CyberSoft Yazilim Muh.
http://www.ibrahimdemir.org
--
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/
blog: http://www.keith-chapman.org
<wsdl:definitions name="CsdemoWsdlTest"
targetNamespace="urn:cs.com.tr/banking"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="urn:cs.com.tr/banking"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xs:schema elementFormDefault="qualified"
targetNamespace="urn:cs.com.tr/banking" version="1.0"
xmlns:tns="urn:cs.com.tr/banking" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="request" type="tns:Request"/>
<xs:element name="response" type="tns:Response"/>
<xs:complexType name="Request">
<xs:sequence>
<xs:element minOccurs="0" name="inBag" type="tns:InBag"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Response">
<xs:sequence>
<xs:element minOccurs="0" name="outBag" type="tns:OutBag"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="InBag">
<xs:sequence>
<xs:element name="booleanParam" type="xsd:boolean"/>
<xs:element name="currencyParam" type="xsd:string"/>
<xs:element name="csdateParam" type="xsd:string"/>
<xs:element name="cstimeParam" type="xsd:string"/>
<xs:element name="doubleParam" type="xsd:double"/>
<xs:element name="floatParam" type="xsd:float"/>
<xs:element name="intParam" type="xsd:int"/>
<xs:element name="longParam" type="xsd:long"/>
<xs:element name="stringParam" type="xsd:string"/>
<xs:element maxOccurs="unbounded" minOccurs="1"
name="inputList" nillable="true" type="tns:InputList"/>
<xs:element maxOccurs="unbounded" minOccurs="1"
name="tableParam" nillable="true" type="tns:TableParam"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="OutBag">
<xs:sequence>
<xs:element name="outBooleanParam" type="xsd:boolean"/>
<xs:element name="outCurrencyParam" type="xsd:string"/>
<xs:element name="outCsdateParam" type="xsd:string"/>
<xs:element name="outCstimeParam" type="xsd:string"/>
<xs:element name="outDoubleParam" type="xsd:double"/>
<xs:element name="outFloatParam" type="xsd:float"/>
<xs:element name="outIntParam" type="xsd:int"/>
<xs:element name="outLongParam" type="xsd:long"/>
<xs:element name="outStringParam" type="xsd:string"/>
<xs:element maxOccurs="unbounded" minOccurs="1"
name="outputList" nillable="true" type="tns:OutputList"/>
<xs:element maxOccurs="unbounded" minOccurs="1"
name="outTableParam" nillable="true" type="tns:OutTableParam"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="InputList">
<xs:sequence>
<xs:element name="key" type="xsd:string"/>
<xs:element name="value" type="xsd:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TableParam">
<xs:sequence>
<xs:element name="name" type="xsd:string"/>
<xs:element name="age" type="xsd:int"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="OutputList">
<xs:sequence>
<xs:element name="key" type="xsd:string"/>
<xs:element name="value" type="xsd:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="OutTableParam">
<xs:sequence>
<xs:element name="name" type="xsd:string"/>
<xs:element name="age" type="xsd:int"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="serviceRequest">
<wsdl:part element="tns:request" name="parameters"/>
</wsdl:message>
<wsdl:message name="serviceResponse">
<wsdl:part element="tns:response" name="parameters"/>
</wsdl:message>
<wsdl:portType name="CsdemoWsdlTest">
<wsdl:operation name="call">
<wsdl:input message="tns:serviceRequest"/>
<wsdl:output message="tns:serviceResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="CsdemoWsdlTestSOAP" type="tns:CsdemoWsdlTest">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="call">
<soap:operation soapAction="urn:call"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="CsdemoWsdlTest">
<wsdl:port binding="tns:CsdemoWsdlTestSOAP" name="CsdemoWsdlTestSOAP">
<soap:address location="http://localhost:8080/axis2/services/BankingWS?s=CsdemoWsdlTest"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
package tr.com.cs.banking.infrastructure.bankingextensions.webservice.handler;
import org.apache.axiom.om.OMElement;
import org.apache.log4j.Logger;
import tr.com.cs.aurora.auroracore.utility.CSBag;
import
tr.com.cs.banking.infrastructure.bankingextensions.webservice.util.AxiomUtility;
import
tr.com.cs.banking.infrastructure.bankingextensions.webservice.util.HandlerUtility;
public class CSBankingWS {
private static final Logger logger =
Logger.getLogger(CSBankingWS.class);
public OMElement call(OMElement element){
element.build();
element.detach();
OMElement response=null;
try {
logger.info("************************************************");
logger.info("Client Request:");
logger.info(element.getChildren().next());
logger.info("************************************************");
RequestInfo info = HandlerUtility.requestInfo();
String serviceName= info.getRequestesService();
logger.info("You are trying to execute " +
info.getRequestesService() + " service.");
CSBag inBag =
AxiomUtility.generateCSBagFromXML(element);
CSBag outBag=
CSWebServiceExecuter.execute(serviceName,inBag);
logger.info("Service.executed successfully!");
response= HandlerUtility.generateResponse(outBag);
}catch(Exception e) {
logger.error("Problem occured while calling the
service.",e);
}
return response;
}
/*
private OMElement handleDummyCustomerService() {
OMFactory fac = OMAbstractFactory.getOMFactory();
OMNamespace omNs = fac.createOMNamespace(Constants.NAMESPACE,
Constants.TARGET_NAME);
OMElement request = fac.createOMElement("response", omNs);
OMElement outBag = fac.createOMElement("outBag", omNs);
request.addChild(outBag);
OMElement isInserted = fac.createOMElement("isInserted", omNs);
isInserted.setText("true");
outBag.addChild(isInserted);
return request;
}
*/
}
<service name="BankingWS" scope="application">
<description> Cybersoft Banking Web Service</description>
<parameter name="useOriginalwsdl">true</parameter>
<parameter name="modifyUserWSDLPortAddress">false</parameter>
<parameter name="ServiceClass">tr.com.cs.banking.infrastructure.bankingextensions.webservice.handler.CSBankingWS</parameter>
<operation name="call">
<messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver" />
<actionMapping>urn:call</actionMapping>
</operation>
<transports>
<transport>http</transport>
</transports>
</service>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]