4 Replies Latest reply: Oct 19, 2010 3:41 AM by 807574 RSS

    WS as BP: StringIndexOutOfBoundsException

    807574
      I created a Businness Process that implements a Web Service (Server Mode);
      I'm not using an UDDI registry, so when I compile the project JCAPS try to generate a JAR within WSLD and XSD..
      before this operation the compilation generates an exception:

      JavaCAPS.[14 lug 2008 15:19:34,575] DEBUG (com.stc.bpms.common.repository.impl.WSDLRepositoryObjectImpl) - getConcreteModel(): Using cached WSDLDocument
      JavaCAPS.[14 lug 2008 15:19:34,575] WARN (com.stc.wsserver.design.codegen.impl.WSServerCodelet) - com.stc.codegen.framework.model.CodeGenException
      com.stc.codegen.framework.model.CodeGenException
      at com.stc.wsserver.design.codegen.impl.JaxRpcCodelet.generateFileForWar(JaxRpcCodelet.java:1362)
      at com.stc.wsserver.design.codegen.impl.JaxRpcCodelet.generateFiles(JaxRpcCodelet.java:998)
      at com.stc.wsserver.design.codegen.impl.GenerateAndPublish.genAndPublish(GenerateAndPublish.java:121)
      at com.stc.wsserver.design.codegen.impl.WSServerCodelet.generateFiles(WSServerCodelet.java:509)
      at com.stc.codegen.frameworkImpl.model.CodeGenFrameworkImpl.processCodelets(CodeGenFrameworkImpl.java:640)
      at com.stc.codegen.frameworkImpl.model.CodeGenFrameworkImpl.process(CodeGenFrameworkImpl.java:1546)
      at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.process(DeploymentVisitorImpl.java:405)
      at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.process(DeploymentVisitorImpl.java:308)
      at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.traverseDeployment(DeploymentVisitorImpl.java:268)
      at com.stc.codegen.driver.module.DeploymentBuildAction.loadCodeGen(DeploymentBuildAction.java:923)
      at com.stc.codegen.driver.module.DeploymentBuildAction.access$1000(DeploymentBuildAction.java:174)
      at com.stc.codegen.driver.module.DeploymentBuildAction$1.run(DeploymentBuildAction.java:599)
      at org.openide.util.Task.run(Task.java:136)
      at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:599)
      Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -6
      at java.lang.String.substring(String.java:1444)
      at com.stc.wsserver.design.codegen.impl.JaxRpcCodelet.*createTemporaryWSDL*(JaxRpcCodelet.java:1165)
      at com.stc.wsserver.design.codegen.impl.JaxRpcCodelet.*generateFileForWar*(JaxRpcCodelet.java:1194)
      ... 13 more

      I turned the IDE-log in DEBUG mode, but I don't understand where is the problem!

      It will be greatly appreciated, if anyone has solution for this.
      Kind regards,
      Fabrizio
        • 1. Re: WS as BP: StringIndexOutOfBoundsException
          807574
          Will it be possible for you to share the XSD/WSDL you are trying to compile to understand the problem better?
          • 2. Re: WS as BP: StringIndexOutOfBoundsException
            807574
            My WS is very simple: input and output are simple string...

            WSDL (wsdlhSR_SAP_ADT.wsdl)
            <?xml version="1.0" encoding="UTF-8"?>
            <definitions name="wsdlhSR_SAP_ADT" targetNamespace="http://ws.adt.hsr.mi.it" xmlns:tns="http://ws.adt.hsr.mi.it" xmlns:ns0="http://ws.adt.hsr.mi.it" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:imps0="http://ws.adt.hsr.mi.it" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
              <import namespace="http://ws.adt.hsr.mi.it" location="xsd_HL725_ADT_GENERICO_str.xsd"/>
              <import namespace="http://ws.adt.hsr.mi.it" location="xsd_HL725_ACK_str.xsd"/>
              <types>
              </types>
              <message name="sendMsgResponse">
                <part name="HL7ack" element="tns:ACK_msg"/>
              </message>
              <message name="sendMsgRequest">
                <part name="HL7msg" element="tns:ADT_msg"/>
              </message>
              <portType name="ADTMsgConnector">
                <operation name="ADTEventNotification">
                  <input name="sendMsgRequest" message="tns:sendMsgRequest"/>
                  <output name="sendMsgResponse" message="tns:sendMsgResponse"/>
                </operation>
              </portType>
            </definitions>
            XSD - request (xsd_HL725_ADT_GENERICO_str.xsd)
            <?xml version="1.0" encoding="UTF-8"?>
            <xsd:schema targetNamespace="http://ws.adt.hsr.mi.it" xmlns:tns="http://ws.adt.hsr.mi.it" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
              <xsd:element name="ADT_msg" type="xsd:string"/>
            </xsd:schema>
            XSD - response (xsd_HL725_ACK_str.xsd)
            <?xml version="1.0" encoding="UTF-8"?>
            <xsd:schema targetNamespace="http://ws.adt.hsr.mi.it" xmlns:tns="http://ws.adt.hsr.mi.it" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
              <xsd:element name="ACK_msg" type="xsd:string"/>
            </xsd:schema>
            • 3. Re: WS as BP: StringIndexOutOfBoundsException
              807574
              I tried rebuilding from scratch the whole project and it worked.
              I believe the reason is in some bug of eDesigner when projects are copied, since the project with the error was right a copy of a project that was correctly built.

              Regards,
              Fabrizio
              • 4. Re: WS as BP: StringIndexOutOfBoundsException
                807574
                Hi Fabrizio,

                I am getting the same error as well. When you said you tried rebuilding it from scratch, did you mean deleting the jcd's, bpel's, connectivity maps etc and recreating them. Or just deleting the temp folders and building again? I tried the latter option but it did not work for me. And the first option would not be feasible either as ours is a big project and recreating all of them would be a pain.

                Regards,
                Rahul