Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create Request Template for few operations, getting “com.predic8.soamodel.TypeRefAccessException” #270

Open
VMahipalReddy opened this issue Jan 29, 2019 · 3 comments

Comments

@VMahipalReddy
Copy link

I'm using Membrane SOA library to parse WSDL file. While trying to create templates for all the requests, getting exceptions for few operations.

com.predic8.soamodel.TypeRefAccessException: Could not find the referenced type 'j_ItemEffCategory' in namespace 'http://xmlns.oracle.com/apps/flex/fnd/applcore/attachments/model/'. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83) at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:263) at com.predic8.schema.Schema.findType(Schema.groovy:240)

Facing this problem for only for few operations.

@dhananjaysharma
Copy link

Hi, Did you find any solution for this? I am facing same issue.

@ProfessorFritz
Copy link

@rohit1212s
Copy link

@ProfessorFritz I am trying to create a soap request based on differnet type as below but not able to achieve that .Could you please help me on this issue if you can.
if you see the below in Example1 " <req:order xsi:type="req:derivativeOrder" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">" it can be different type based on requirement but by using soa model class it is only generating default request as below in example2:

Example1:-

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://www.able.eu/Epos/Ordering/PreOrderCheck/Request" xmlns:ser="http://syntel.nl/Epos/Common/ServiceContext" xmlns:shar="http://www.able.eu/Epos/Common/SharedObjects">
   <soapenv:Header/>
   <soapenv:Body>
      <req:PreOrderCheckRequest>
         <ser:productServiceContext>
            <!--Optional:-->
            <ser:conversationId>?</ser:conversationId>
            <!--Optional:-->
            <ser:deviceTypeId>?</ser:deviceTypeId>
            <!--Optional:-->
            <ser:entityId>?</ser:entityId>
            <!--Optional:-->
            <ser:advisor>
               <ser:id>?</ser:id>
            </ser:advisor>
            <!--You have a CHOICE of the next 2 items at this level-->
            <ser:product>
               <ser:id>?</ser:id>
            </ser:product>
            <ser:account>
               <ser:id>?</ser:id>
            </ser:account>
            <!--You have a CHOICE of the next 2 items at this level-->
            <ser:user>
               <ser:id>?</ser:id>
               <!--Optional:-->
               <ser:type>?</ser:type>
            </ser:user>
            <!--1 to 2 repetitions:-->
            <shar:externalUser>
               <shar:externalId>?</shar:externalId>
               <shar:type>?</shar:type>
               <!--Optional:-->
               <shar:advisor>
                  <shar:externalId>?</shar:externalId>
                  <shar:type>?</shar:type>
               </shar:advisor>
            </shar:externalUser>
         </ser:productServiceContext>
         <req:order xsi:type="req:derivativeOrder" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <req:cashAccount>
      <req:accountNumber>?</req:accountNumber>
      <req:accountType>
         <req:id>?</req:id>
      </req:accountType>
      <req:currency>
         <req:id>?</req:id>
      </req:currency>
   </req:cashAccount>
   <!--Optional:-->
   <req:distributionChannel>
      <req:id>?</req:id>
   </req:distributionChannel>
   <req:kind>
      <!--Optional:-->
      <req:limitPrice>?</req:limitPrice>
      <req:symbol>?</req:symbol>
   </req:kind>
   <req:quantity>?</req:quantity>
   <req:securitiesAccount>
      <req:accountNumber>?</req:accountNumber>
      <req:accountType>
         <req:id>?</req:id>
      </req:accountType>
   </req:securitiesAccount>
   <req:instrument>
      <req:instrumentKey>
         <!--Optional:-->
         <req:exercisePrice>?</req:exercisePrice>
         <!--Optional:-->
         <req:expiryDate>?</req:expiryDate>
         <!--Optional:-->
         <req:optionType>?</req:optionType>
         <req:symbol>?</req:symbol>
      </req:instrumentKey>
      <req:code>?</req:code>
      <req:orderTransactionType>
         <req:symbol>?</req:symbol>
      </req:orderTransactionType>
   </req:instrument>
</req:order>
      </req:PreOrderCheckRequest>
   </soapenv:Body>
</soapenv:Envelope>

Example2:--

<s11:Envelope xmlns:s11='http://schemas.xmlsoap.org/soap/envelope/'>
  <s11:Body>
    <sch56:PreOrderCheckRequest xmlns:sch56='http://www.able.eu/Epos/Ordering/PreOrderCheck/Request'>
      <sch4:productServiceContext xmlns:sch4='http://syntel.nl/Epos/Common/ServiceContext'>
<!-- optional -->
<!-- Pattern: \S.*, Min Lenght: 1, Max Length: 128 -->
        <sch4:conversationId>???</sch4:conversationId>
<!-- optional -->
<!-- fraction digits: 0, maximum number of digits: 4 -->
        <sch4:deviceTypeId>???</sch4:deviceTypeId>
<!-- optional -->
<!-- Pattern: \S.*, Min Lenght: 1, Max Length: 20 -->
        <sch4:entityId>???</sch4:entityId>
<!-- optional -->
        <sch4:advisor>
<!-- Pattern: \S.*, Min Lenght: 1, Max Length: 30 -->
          <sch4:id>???</sch4:id>
        </sch4:advisor>
        <sch4:product>
<!-- fraction digits: 0, maximum number of digits: 15 -->
          <sch4:id>???</sch4:id>
        </sch4:product>
        <sch4:account>
<!-- Pattern: [A-Za-z0-9]*, Min Lenght: 1, Max Length: 34 -->
          <sch4:id>???</sch4:id>
        </sch4:account>
        <sch4:user>
<!-- Pattern: \S.*, Min Lenght: 1, Max Length: 45 -->
          <sch4:id>???</sch4:id>
<!-- optional -->
<!-- possible value: EXTERNAL_ID, possible value: LOGIN_ID -->
          <sch4:type>???</sch4:type>
        </sch4:user>
<!-- from 1 to 2 -->
        <sch2:externalUser xmlns:sch2='http://www.able.eu/Epos/Common/SharedObjects'>
<!-- Pattern: \S.*, Min Lenght: 1, Max Length: 45 -->
          <sch2:externalId>???</sch2:externalId>
<!-- possible value: EXTERNAL_1, possible value: EXTERNAL_2 -->
          <sch2:type>???</sch2:type>
<!-- optional -->
          <sch2:advisor>
<!-- Pattern: \S.*, Min Lenght: 1, Max Length: 45 -->
            <sch2:externalId>???</sch2:externalId>
<!-- possible value: EXTERNAL_1, possible value: EXTERNAL_2 -->
            <sch2:type>???</sch2:type>
          </sch2:advisor>
        </sch2:externalUser>
      </sch4:productServiceContext>
      <sch56:order>
        <sch56:cashAccount>
<!-- Pattern: [A-Za-z0-9]*, Min Lenght: 1, Max Length: 34 -->
          <sch56:accountNumber>???</sch56:accountNumber>
          <sch56:accountType>
<!-- fraction digits: 0, maximum number of digits: 4 -->
            <sch56:id>???</sch56:id>
          </sch56:accountType>
          <sch56:currency>
<!-- Pattern: [A-Za-z]*, Min Lenght: 1, Max Length: 4 -->
            <sch56:id>???</sch56:id>
          </sch56:currency>
        </sch56:cashAccount>
<!-- optional -->
        <sch56:distributionChannel>
<!-- fraction digits: 0, maximum number of digits: 4 -->
          <sch56:id>???</sch56:id>
        </sch56:distributionChannel>
        <sch56:kind>
<!-- optional -->
<!-- fraction digits: 4, maximum number of digits: 15 -->
          <sch56:limitPrice>???</sch56:limitPrice>
<!-- possible value: AGIO, possible value: ALL_OR_NONE, possible value: DISAGIO, possible value: EVEN_MONEY, possible value: LIMIT, possible value: MARKET, possible value: MARKET_ON_OPENING, possible value: MARKET_TO_LIMIT, possible value: MUST_BE_FILLED, possible value: STOP_LIMIT, possible value: STOP_LOSS -->
          <sch56:symbol>???</sch56:symbol>
        </sch56:kind>
<!-- fraction digits: 4, maximum number of digits: 10 -->
        <sch56:quantity>???</sch56:quantity>
        <sch56:securitiesAccount>
<!-- Pattern: [A-Za-z0-9]*, Min Lenght: 1, Max Length: 34 -->
          <sch56:accountNumber>???</sch56:accountNumber>
          <sch56:accountType>
<!-- fraction digits: 0, maximum number of digits: 4 -->
            <sch56:id>???</sch56:id>
          </sch56:accountType>
        </sch56:securitiesAccount>
      </sch56:order>
    </sch56:PreOrderCheckRequest>
  </s11:Body>
</s11:Envelope>

In this example2 Order tag is not getting implemented by different type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants