0 Replies Latest reply on Dec 4, 2007 1:53 PM by Meghana Joglekar

    NullPointerException from JBossXSEntityResolver

    Meghana Joglekar Novice

      Hello,

      Versions
      JBoss - 4.0.5GA
      JBossWS - jbossws-1.2.1.GA (build=200704161533)
      jBPM - 3.2
      BPEL extension - 1.1 Beta 3

      Error

      While disconnected from internet, my BPEL process which is deployed as webservice over JBossWS fails to deploy with following exception -

      09:48:03,236 ERROR [STDERR] Caused by: java.lang.NullPointerException
      09:48:03,236 ERROR [STDERR] at org.jboss.ws.metadata.wsdl.xmlschema.JBossXSEntityResolver.getXMLInputSource(JBossXSE
      ntityResolver.java:167)
      09:48:03,236 ERROR [STDERR] at org.jboss.ws.metadata.wsdl.xmlschema.JBossXSEntityResolver.resolveEntity(JBossXSEntit
      yResolver.java:135)
      09:48:03,236 ERROR [STDERR] at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
      09:48:03,236 ERROR [STDERR] at org.apache.xerces.impl.xs.XMLSchemaLoader.resolveDocument(Unknown Source)
      


      WSDL setup - probable cause

      My BPEL WSDL file imports another WSDL and also declares with schema import in it.
      <?xml version="1.0" encoding="utf-8"?>
      <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:evt="http://www.eclipse.org/alf/schema/EventBase/1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:tns="http://flow" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="AlfServiceFlow" targetNamespace="http://flow" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:Nov28appALFServiceFlow="http://www.eclipse.org/alf/schema/EventBase/1">
       <import namespace="http://www.eclipse.org/alf/schema/EventBase/1" location="resources/xml/Nov28appALFServiceFlow.wsdl" />
       <plnk:partnerLinkType name="AlfServiceFlow">
       <plnk:role name="AlfServiceFlowProvider">
       <plnk:portType name="Nov28appALFServiceFlow:Nov28appALFServiceFlow" />
       </plnk:role>
       </plnk:partnerLinkType>
       <bpws:property name="ServiceFlowId" type="xs:string" />
       <bpws:propertyAlias messageType="Nov28appALFServiceFlow:Nov28appEventNotice" part="EventNotice" propertyName="tns:ServiceFlowId" query="/EventNotice/Nov28appALFServiceFlow:Base/Nov28appALFServiceFlow:EventControl/Nov28appALFServiceFlow:ServiceFlowId" />
       <types>
       <xs:schema xmlns="http://flow" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://flow" xmlns:xs="http://www.w3.org/2001/XMLSchema">
       <xs:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" schemaLocation="oasis-200401-wss-wssecurity-secext-1.0.xsd" />
       <xs:element name="test" type="xs:gMonth" />
      </xs:schema>
       </types>
      


      The imported WSDL includes another XSD file.

      During my debugging I found that JBossWS generates this second XSD file under <Jboss-home>\tmp\JBossWS location but it fails to generate the oasis security XSD which is originally under same folder as main WSDL file.

      Can someone please confirm if this is a bug in JBossWS?

      When I copy the missing XSD file manually under tmp location, it finds it fine.

      Thank you,
      Meghana