1 Reply Latest reply on Dec 9, 2005 2:14 PM by Thomas Diesler

    [PortProxy] Port error

    Simon Diaz Newbie

      Hi

      Im trying to create a client to consume an external websevice.

      Im using
      http://wiki.jboss.org/wiki/Wiki.jsp?page=WSDOCClientStepByStep as a template.

      Ive tried to deploy it on 4.0.2 and have installed a clean 4.0.3sp1 in desperation but still have the same errors.

      Im getting the following error.

      09:30:04,931 INFO [STDOUT] 1
      09:30:04,931 INFO [STDOUT] 2
      09:30:05,244 INFO [STDOUT] 3
      09:30:15,197 INFO [STDOUT] 4
      09:30:15,416 INFO [STDOUT] 5
      09:30:23,916 ERROR [PortProxy] Port error
      AxisFault
      faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
      faultSubcode:
      faultString: Server was unable to process request. --> Object reference not set to an instance of an object.
      faultActor:
      faultNode:
      faultDetail:

      org.jboss.axis.AxisFault: Server was unable to process request. --> Object reference not set to an instance of an object.
      at org.jboss.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:303)
      at org.jboss.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:142)
      at org.jboss.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1249)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:585)
      at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:560)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1555)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:341)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:828)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:758)
      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1178)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
      at org.jboss.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:257)
      at org.jboss.axis.MessagePart.getAsSOAPEnvelope(MessagePart.java:684)
      at org.jboss.axis.Message.getSOAPEnvelope(Message.java:428)
      at org.jboss.axis.client.Call.invokeEngine(Call.java:3102)
      at org.jboss.axis.client.Call.invoke(Call.java:3064)
      at org.jboss.axis.client.Call.invoke(Call.java:2652)
      at org.jboss.axis.client.Call.invoke(Call.java:2561)
      at org.jboss.axis.client.Call.invokeInternal(Call.java:1982)
      at org.jboss.axis.client.Call.invoke(Call.java:1920)
      at org.jboss.webservice.client.CallImpl.invoke(CallImpl.java:265)
      at org.jboss.axis.client.AxisClientProxy.invokeSEIMethod(AxisClientProxy.java:286)
      at org.jboss.webservice.client.PortProxy.invoke(PortProxy.java:177)
      at $Proxy170.sendSMSEx(Unknown Source)
      at uk.gov.mvdc.sms.actions.SendSmsAction.execute(SendSmsAction.java:54)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:534)
      09:30:23,916 INFO [STDOUT] AxisFault
      faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
      faultSubcode:
      faultString: Server was unable to process request. --> Object reference not set to an instance of an object.
      faultActor:
      faultNode:
      faultDetail:
      09:30:23,931 INFO [STDOUT] org.jboss.axis.AxisFault: Server was unable to process request. --> Object reference not set to an instance of an object.
      09:30:23,931 INFO [STDOUT] at org.jboss.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:303)
      09:30:23,931 INFO [STDOUT] at org.jboss.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:142)
      09:30:23,931 INFO [STDOUT] at org.jboss.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1249)
      09:30:23,931 INFO [STDOUT] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:585)
      09:30:23,931 INFO [STDOUT] at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:560)
      09:30:23,931 INFO [STDOUT] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1555)
      09:30:23,931 INFO [STDOUT] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:341)
      09:30:23,931 INFO [STDOUT] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:828)
      09:30:23,931 INFO [STDOUT] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:758)
      09:30:23,931 INFO [STDOUT] at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
      09:30:23,931 INFO [STDOUT] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1178)
      09:30:23,947 INFO [STDOUT] at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
      09:30:23,947 INFO [STDOUT] at org.jboss.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:257)
      09:30:23,947 INFO [STDOUT] at org.jboss.axis.MessagePart.getAsSOAPEnvelope(MessagePart.java:684)
      09:30:23,947 INFO [STDOUT] at org.jboss.axis.Message.getSOAPEnvelope(Message.java:428)
      09:30:23,947 INFO [STDOUT] at org.jboss.axis.client.Call.invokeEngine(Call.java:3102)
      09:30:23,947 INFO [STDOUT] at org.jboss.axis.client.Call.invoke(Call.java:3064)
      09:30:23,947 INFO [STDOUT] at org.jboss.axis.client.Call.invoke(Call.java:2652)
      09:30:23,947 INFO [STDOUT] at org.jboss.axis.client.Call.invoke(Call.java:2561)
      09:30:23,947 INFO [STDOUT] at org.jboss.axis.client.Call.invokeInternal(Call.java:1982)
      09:30:23,947 INFO [STDOUT] at org.jboss.axis.client.Call.invoke(Call.java:1920)
      09:30:23,947 INFO [STDOUT] at org.jboss.webservice.client.CallImpl.invoke(CallImpl.java:265)
      09:30:23,947 INFO [STDOUT] at org.jboss.axis.client.AxisClientProxy.invokeSEIMethod(AxisClientProxy.java:286)
      09:30:23,963 INFO [STDOUT] at org.jboss.webservice.client.PortProxy.invoke(PortProxy.java:177)
      09:30:23,963 INFO [STDOUT] at $Proxy170.sendSMSEx(Unknown Source)
      09:30:23,963 INFO [STDOUT] at uk.gov.mvdc.sms.actions.SendSmsAction.execute(SendSmsAction.java:54)
      09:30:23,963 INFO [STDOUT] at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
      09:30:23,963 INFO [STDOUT] at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
      09:30:23,963 INFO [STDOUT] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
      09:30:23,963 INFO [STDOUT] at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
      09:30:23,963 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
      09:30:23,963 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      09:30:23,963 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      09:30:23,963 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      09:30:23,963 INFO [STDOUT] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      09:30:23,963 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      09:30:23,963 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      09:30:23,994 INFO [STDOUT] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      09:30:23,994 INFO [STDOUT] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      09:30:23,994 INFO [STDOUT] at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
      09:30:23,994 INFO [STDOUT] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
      09:30:23,994 INFO [STDOUT] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
      09:30:23,994 INFO [STDOUT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      09:30:23,994 INFO [STDOUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      09:30:23,994 INFO [STDOUT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      09:30:24,010 INFO [STDOUT] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      09:30:24,010 INFO [STDOUT] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
      09:30:24,010 INFO [STDOUT] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      09:30:24,010 INFO [STDOUT] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      09:30:24,010 INFO [STDOUT] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      09:30:24,010 INFO [STDOUT] at java.lang.Thread.run(Thread.java:534)


      Ive been trying to figure this out for on and off for 2 weeks.
      Any help is appreciated.

      Additional Info:

      Client Jar
      application-client.xml
      <?xml version="1.0" encoding="UTF-8"?>

      <application-client xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
      version="1.4">

      <display-name>webservice client app</display-name>

      <service-ref>
      <service-ref-name>service/SMS</service-ref-name>
      <service-interface>uk.gov.mvdc.textanywhere.TextAnywhere_SMS</service-interface>
      <wsdl-file>USE_JBOSS_CLIENT_XML_OVERRIDE</wsdl-file>
      <jaxrpc-mapping-file>META-INF/jaxrpc-mapping-client.xml</jaxrpc-mapping-file>
      </service-ref>

      </application-client>

      jboss-client.xml
      <?xml version='1.0' encoding='UTF-8' ?>

      <!DOCTYPE jboss-client PUBLIC
      "-//JBoss//DTD Application Client 4.0//EN"
      "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">

      <jboss-client>
      <jndi-name>sms-client</jndi-name>
      <service-ref>
      <service-ref-name>service/SMS</service-ref-name>
      <wsdl-override>https://ws.textanywhere.net/ta_SMS.asmx?wsdl</wsdl-override>
      </service-ref>
      </jboss-client>

      I also have the generated jaxrpc-mapping-client.xml.


      Servlet which runs tries to execute it

      public class SendSmsAction extends Action {
      public ActionForward execute(ActionMapping mapping,
      ActionForm form,
      HttpServletRequest req,
      HttpServletResponse res)
      {
      System.out.print("1");
      String forward = "sms_login";
      System.out.print("2");

      try {
      InitialContext ic = getInitialContext();
      System.out.print("3");

      TextAnywhere_SMS service = (TextAnywhere_SMS)ic.lookup("java:comp/env/service/SMS");
      System.out.print("4");
      TextAnywhere_SMSSoap endpoint = service.getTextAnywhere_SMSSoap();
      System.out.print("5");

      SendSMSExResponse response = endpoint.sendSMSEx(getSMS());
      System.out.print("6");

      } catch (NamingException e) {
      e.printStackTrace();
      } catch (ServiceException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (RemoteException e) {
      e.printStackTrace();
      }

      return (mapping.findForward(forward));
      }

      private InitialContext getInitialContext() throws NamingException{
      Properties env = new Properties();
      env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      env.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");
      env.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
      env.setProperty("j2ee.clientName", "sms-client");
      return new InitialContext(env);

      }

      private SendSMSEx getSMS(){
      String clientID = "XXXXXX";
      String client_Pass = "XXXXXX";
      String client_Ref = "IT";
      String billing_Ref = "123";
      int connection = 2;
      String originator = "MVDC";
      int OType = 1;
      String destination = "07941947473";
      String body = "Hello";
      int SMS_Type = 0;
      int reply_Type = 0;
      String reply_Data = "";


      SendSMSEx sendSMS = new SendSMSEx(clientID, client_Pass, client_Ref, billing_Ref, connection, originator, OType, destination, body, SMS_Type, reply_Type, reply_Data);
      return sendSMS;
      }

      }

      Kind regards

      Simon

        • 1. Re: [PortProxy] Port error
          Thomas Diesler Master

           


          Ive been trying to figure this out for on and off for 2 weeks.


          Posts to this forum will be dealt with at
          the community's leisure. If your business is such that you need
          to rely on qualified answers within a known time frame, this forum
          might not be your preferred support channel.

          --------------

          Have you looked at the SOAP messages that are beeing exchanged? Do they conform to the abstract contract defined in wsdl?

          For future posts, pls use the [ code ] marker.