Hi
 
Why EPR operation is not found?
 
 
Exception: The endpoint reference (EPR) for the Operation not found is 
http://localhost:8080/axis2/services/Random and the WSA Action = 
urn:anonOutInOp 
 
 
 
My Coding:
 
<%@ page import="org.apache.axiom.om.OMAbstractFactory,                 
org.apache.axiom.om.OMElement,                 org.apache.axiom.om.OMFactory,   
              org.apache.axiom.om.OMNamespace,                 
org.apache.axis2.AxisFault,                 org.apache.axis2.Constants,         
        org.apache.axis2.addressing.EndpointReference,                 
org.apache.axis2.client.Options,                 
org.apache.axis2.client.ServiceClient,                 
org.apache.axis2.context.ConfigurationContext,                 
org.apache.axis2.context.ConfigurationContextFactory" %>
 
<%! private OMElement createEnvelope() {        OMFactory fac = 
OMAbstractFactory.getOMFactory();        OMNamespace omNs = 
fac.createOMNamespace("http://axisversion.sample/xsd";, "ns1");        OMElement 
method = fac.createOMElement("getVersion", omNs);        OMElement value = 
fac.createOMElement("myValue", omNs);        method.addChild(value);        
return method;    }
%>
<% String IP = "http://localhost:8080/axis2/axis2-web/trial.jsp";; int lastindex 
= IP.lastIndexOf('/');          IP = IP.substring(0, lastindex);            
///axis2/axis2-web/services/version            IP = IP.replaceAll("axis2-web", 
"");%>
<% try{     OMElement payload = createEnvelope();            
ConfigurationContext configctx =  
ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, 
null);            ServiceClient client = new ServiceClient(configctx, null);    
        EndpointReference targetEPR = new EndpointReference(IP + 
configctx.getServicePath() + "/Random");                        Options options 
= new Options();            client.setOptions(options);            
options.setTo(targetEPR);            
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
            OMElement result = client.sendReceive(payload);            
out.println("Result: " +result);
                } catch (Exception e) {  out.println("Exception: 
"+e.getMessage());
        } 
%>
_________________________________________________________________
More photos; more messages; more whatever – Get MORE with Windows Live™ 
Hotmail®. NOW with 5GB storage.
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_5G_0907

Reply via email to