Add namespace to WSDL definition - asp.net

I have a very BASIC WCF service with WSDL defition as follows:
<wsdl:definitions
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:tns="urn:MyService"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"
xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsa10="http://www.w3.org/2005/08/**addressing"
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
name="MyService" targetNamespace="urn:MyService">
I want to add the namespace xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" to the definition but i don't know where and how.
How do i add that namespace ? Thank you

Just edit and add the string xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
An example:
<definitions
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:tns="http://example.com/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
name="WebServiceName"
targetNamespace="http://example.com/"
xmlns="http://schemas.xmlsoap.org/wsdl/">

Related

Getting FQTV DATA EXISTS FOR THIS PASSENGER in TravelItineraryModifyInfoRQ

request-
<soapenv:Body>
<ns:TravelItineraryModifyInfoRQ Version="2.1.1">
<ns:CustomerInfo>
<ns:CustLoyalty MembershipID="520000001221" NameNumber="02.01"
ProgramID="EY" RPH="1" />
</ns:CustomerInfo>
</ns:TravelItineraryModifyInfoRQ>
</soapenv:Body>
response-
<soap-env:Body>
<TravelItineraryModifyInfoRS Version="2.1.1"
xmlns="http://webservices.sabre.com/sabreXML/2011/10"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:stl="http://services.sabre.com/STL/v01">
<stl:ApplicationResults status="NotProcessed">
<stl:Error type="BusinessLogic" timeStamp="2018-04-20T13:13:39-
05:00">
<stl:SystemSpecificResults>
<stl:Message>.EY/EY FQTV DATA EXISTS FOR THIS PASSENGER.SEE
ITEM 02</stl:Message>
<stl:Message>.ENTRY NOT PROCESSED BEGINNING WITH</stl:Message>
<stl:Message>FF1¤EY100014486283-02.01</stl:Message>
<stl:ShortText>ERR.SWS.HOST.ERROR_IN_RESPONSE</stl:ShortText>
</stl:SystemSpecificResults>
</stl:Error>
</stl:ApplicationResults>
</TravelItineraryModifyInfoRS>
</soap-env:Body>
Is modification not allowed on membership id.
http://webservices.sabre.com/drc/servicedoc/TravelItineraryAddInfoLLSRQ_v2.2.0_Sample_Payloads.xml
Seems it can be.
It would appear that the FF data for passenger 02.01 is stored in RPH2, and you're attempting to modify 1, while the passenger's data is still in RPH2.
Try modifying the request to RPH 2:
<soapenv:Body>
<ns:TravelItineraryModifyInfoRQ Version="2.1.1">
<ns:CustomerInfo>
<ns:CustLoyalty MembershipID="520000001221" NameNumber="02.01"
ProgramID="EY" RPH="2" />
</ns:CustomerInfo>
</ns:TravelItineraryModifyInfoRQ>
</soapenv:Body>

How do I add SSR OSI to SABRE 2.2.1 API

Below is sample request I made, and below is the response I'm getting.
If you can post sample SpecialServiceRq OSI entry request and response sample that would help a lot.
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<SpecialServiceRQ ReturnHostCommand="false" TimeStamp="2018-03-05T19:02:32.219-05:00" Version="2.2.1" xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:ns2="http://services.sabre.com/STL/v01">
<SpecialServiceInfo>
<SecureFlight SegmentNumber="A">
<PersonName DateOfBirth="1969-02-25" Gender="M" NameNumber="1.1">
<GivenName>LIAM</GivenName>
<Surname>JACKSON</Surname>
</PersonName>
</SecureFlight>
<Service SSR_Code="OSI">
<Text>CTCE/ACCEPT//TEST.CORP.COMPANY.COM</Text>
</Service>
</SpecialServiceInfo>
</SpecialServiceRQ>]
[03-05-18 19:02:32.462] [SplitAgentBooker_10009498321_10009498321_2139481603] INFO SABREpl_timings - : T:0.234 secs S:ABE_ABEBOOKD01_9RVB_000000000002 A:SpecialServiceLLSRS M:2139481603_37114603_37772403_14 RSP: [<?xml version="1.0" encoding="UTF-8"?>
<SpecialServiceRS Version="2.2.1" xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:stl="http://services.sabre.com/STL/v01" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<stl:ApplicationResults status="NotProcessed">
<stl:Error timeStamp="2018-03-05T18:02:32-06:00" type="BusinessLogic">
<stl:SystemSpecificResults>
<stl:Message>.CHECK ENTRY FORMAT.NOT ENT BGNG WITH</stl:Message>
<stl:Message>3OSI CTCE/ACCEPT//TEST.CORP.COMPANY.COM</stl:Message>
<stl:ShortText>ERR.SWS.HOST.ERROR_IN_RESPONSE</stl:ShortText>
</stl:SystemSpecificResults>
</stl:Error>
</stl:ApplicationResults>
</SpecialServiceRS>
If your intention is to create the 3CTCEA/ACCEPT//TEST.CORP.COMPANY.COM-1.1 format, then you don't have to use the SecureFlight node, as that one creates the 3DOCS format.
I would advise to remove it altogether:
<SpecialServiceRQ TimeStamp="2018-03-05T19:02:32.219-05:00" Version="2.2.1" xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:ns2="http://services.sabre.com/STL/v01" ReturnHostCommand="true">
<SpecialServiceInfo>
<Service SSR_Code="CTCE" SegmentNumber="A">
<PersonName NameNumber="1.1"/>
<Text>ACCEPT//TEST.CORP.COMPANY.COM</Text>
</Service>
</SpecialServiceInfo>
This way you will create the above format. If this is not the format let me know which one is and I will help with that one as well.

Alfresco: CMIS web services binding: Why alfresco gives cmis:item by protocol cmis 1.0?

I'm trying to get a document from Alfresco 5.2 using CMIS web services binding (http://server:8080/alfresco/cmisws/cmis?wsdl) and get an error.
Using the wireshark I found that the problem is that the alfresco in the response returns cmis:item element. But according to cmis 1.0 protocol it should not be returned. Why is this happening?
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="0">
<wsu:Timestamp
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsu:Created>2017-10-06T15:33:27.634Z</wsu:Created>
</wsu:Timestamp>
<wsse:UsernameToken>
<wsse:Username>admin</wsse:Username>
<wsse:Password wsse:Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">0000</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<ns2:getTypeDescendants xmlns:ns2="http://docs.oasis-open.org/ns/cmis/messaging/200908/" xmlns="http://docs.oasis-open.org/ns/cmis/core/200908/">
<ns2:repositoryId>53131d3f-d80b-4964-87d9-08b614fe7861</ns2:repositoryId>
<ns2:depth>-1</ns2:depth>
<ns2:includePropertyDefinitions>false</ns2:includePropertyDefinitions>
</ns2:getTypeDescendants>
</soapenv:Body>
</soapenv:Envelope>
Response(part):
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<getTypeDescendantsResponse xmlns="http://docs.oasis-open.org/ns/cmis/messaging/200908/" xmlns:ns2="http://docs.oasis-open.org/ns/cmis/core/200908/">
<types>
<type xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:cmisTypeItemDefinitionType">
<ns2:id>cmis:item</ns2:id>
<ns2:localName>item</ns2:localName><ns2:localNamespace>http://www.alfresco.org/model/cmis/1.0/cs01</ns2:localNamespace>
<ns2:displayName>Item Type</ns2:displayName>
<ns2:queryName>cmis:item</ns2:queryName>
<ns2:description>CMIS Item</ns2:description>
<ns2:baseId>cmis:item</ns2:baseId>
<ns2:creatable>false</ns2:creatable>
<ns2:fileable>false</ns2:fileable>
<ns2:queryable>false</ns2:queryable>
<ns2:fulltextIndexed>true</ns2:fulltextIndexed>
<ns2:includedInSupertypeQuery>true</ns2:includedInSupertypeQuery>
<ns2:controllablePolicy>true</ns2:controllablePolicy>
<ns2:controllableACL>true</ns2:controllableACL>
</type>

Can we use ejb-jar.xml instead of annotations for MessageDrivenBean(MDB) in EJB 3.0?

I've configured the message destination type, name etc using #ActivationConfigProperty in EJB 3.0 but I wanted to configure the MDB using deployment descriptor (ejb-jar.xml) as in EJB 2.0.
FYI: I'm using JBoss 6
Can anyone guide me on this?
Thanks man, but I've figured it out in a much simpler way. Below is the code
<ejb-jar id="ejb-jar_ID" version="3.1"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd">
<display-name>SampleTransactionMDB</display-name>
<enterprise-beans>
<message-driven>
<display-name>SampleTransactionMDB</display-name>
<ejb-name>SampleTransactionMDB</ejb-name>
<ejb-class>com.example.SampleTransactionMDB</ejb-class>
<transaction-type>Container</transaction-type>
<activation-config>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destination</activation-config-property-name>
<activation-config-property-value>/queue/SampleTransactionQueue</activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
</assembly-descriptor>
</ejb-jar>
Below is the xml content for configuring MDB, can modify the below code accordingly.
<enterprise-beans>
<message-driven>
<ejb-name>SomeMessageBean</ejb-name>
<ejb-class>
com.bean.SomeMessageBean
</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Container</transaction-type>
<message-destination-type>
javax.jms.Queue
</message-destination-type>
<activation-config>
<activation-property>
<activation-config-property-name>destinationType
</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue
</activation-config-property-value>
</activation-property>
<activation-property>
<activation-config-property-name>messageSelector
</activation-config-property-name>
<activation-config-property-value>MessageFormat = 'Version 3.4'
</activation-config-property-value>
</activation-property>
<activation-property>
<activation-config-property-name>acknowledgeMode
</activation-config-property-name>
<activation-config-property-value>Auto-acknowledge
</activation-config-property-value>
</activation-property>
</activation-config>
<resource-ref>
<resource-ref-name>jms/ConnectionFactory</resource-ref-name>
<resource-type>
javax.jms.ConnectionFactory
</resource-type>
<res-auth>Container</res-auth>
<mapped-name>ConnectionFactory</mapped-name>
<injection-target>
<injection-target-class>
com.bean.SomeMessageBean
</injection-target-class>
<injection-target-name>datasource</injection-target-name>
</injection-target>
</resource-ref>
</message-driven>
</enterprise-beans>

seam with tomcat "entityManager is null"

I have a problem when deploying seam with tomcat. I get this error :
Caused by: java.lang.IllegalStateException: entityManager is null
at org.jboss.seam.framework.EntityQuery.validate(EntityQuery.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
.......................................
Here are my details. I have followed all the details from jboss seam jpa example :
persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="bookingDatabase">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<non-jta-data-source>java:comp/env/jdbc/TestDB</non-jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="validate"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
</properties>
</persistence-unit>
</persistence>
This is my component.xml. I think there is no problem with it.
components.xml
<?xml version="1.0" encoding="UTF-8"?>
<components xmlns="http://jboss.com/products/seam/components"
xmlns:core="http://jboss.com/products/seam/core"
xmlns:persistence="http://jboss.com/products/seam/persistence"
xmlns:drools="http://jboss.com/products/seam/drools"
xmlns:bpm="http://jboss.com/products/seam/bpm"
xmlns:security="http://jboss.com/products/seam/security"
xmlns:mail="http://jboss.com/products/seam/mail"
xmlns:web="http://jboss.com/products/seam/web"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cache="http://jboss.com/products/seam/cache"
xmlns:async="http://jboss.com/products/seam/async"
xmlns:transaction="http://jboss.com/products/seam/transaction"
xsi:schemaLocation=
"http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.2.xsd
http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.2.xsd
http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.2.xsd
http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.2.xsd
http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.2.xsd
http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.2.xsd
http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.2.xsd
http://jboss.com/products/seam/cache http://jboss.com/products/seam/cache-2.2.xsd
http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.2.xsd
http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd
http://jboss.com/products/seam/async http://jboss.com/products/seam/async-2.0.xsd ">
<core:manager concurrent-request-timeout="500"
conversation-timeout="120000"
conversation-id-parameter="cid"
parent-conversation-id-parameter="pid"/>
<transaction:entity-transaction entity-manager="#{em}"/>
<persistence:entity-manager-factory name="bookingDatabase"/>
<persistence:managed-persistence-context name="em"
auto-create="true"
entity-manager-factory="#{bookingDatabase}"/>
<security:identity authenticate-method="#{authenticator.authenticate}"/>
<async:quartz-dispatcher/>
<cache:eh-cache-provider name="cacheProvider" auto-create="true"/>
<!-- Make sure this URL pattern is the same as that used by the Faces Servlet -->
<web:hot-deploy-filter url-pattern="*.seam"/>
<drools:rule-base name="securityRules">
<drools:rule-files>
<value>/security.drl</value>
</drools:rule-files>
</drools:rule-base>
<security:rule-based-permission-resolver security-rules="#{securityRules}"/>
<security:jpa-identity-store
user-class="org.domain.simpopanpa.entity.UserAccount"
role-class="org.domain.simpopanpa.entity.UserRole"/>
<security:jpa-permission-store
user-permission-class="org.domain.simpopanpa.entity.UserPermission"/>
<event type="org.jboss.seam.security.notLoggedIn">
<action execute="#{redirect.captureCurrentView}"/>
</event>
<event type="org.jboss.seam.security.loginSuccessful">
<action execute="#{redirect.returnToCapturedView}"/>
</event>
<mail:mail-session host="localhost" port="25"/>
</components>
I have added the context.xml file as described in some forums.
context.xml
<Context path="/someName" docBase="someName"
debug="5" reloadable="true" crossContext="true">
<Resource auth="Container"
name="jdbc/TestDB"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:#127.0.0.1:1521:db11g"
username="user"
password="pass"
maxActive="100"
maxIdle="30"
maxWait="10000"/>
</Context>
I use tomcat 7 and jboss seam 2.2.1
You named the persistence context 'em'. The entityquery is per default trying to fetch it by 'entitymanager'. So either change the name in your components.xml or you have to call entityquery.setPersistenceContextName("em").

Resources