Both Visual Studio 2010 and 2012 give an opaque error when I try to import a PeopleSoft WSDL as a service reference.
I right-click on Service References, select Add Service Reference, paste the URL under Address, hit Go, then hit OK.
I get this opaque error:
http://xmlns.oracle.com/Enterprise/Tools/schemas doesn't appear to resolve to anything, but I'm almost certain that doesn't matter.
I've also tested this in soapUI on the same PC as Visual Studio, and everything works correctly there. I can access the SOAP service and get expected responses.
The opaqueness of the error message is confusing, and this works in soapUI, so the WSDL is presumptively good? I've searched on this error and haven't found anything so far.
Here's the WSDL (sanitized to obscure URLs and service details):
<?xml version="1.0"?>
<wsdl:definitions name="A_PROGRAM_SERVICE.1" targetNamespace="http://xmlns.oracle.com/Enterprise/HCM/schemas/A_PROGRAM_SERVICE.1" xmlns:A_PROGRAM_REQUEST_MSG.VERSION_1="http://xmlns.oracle.com/Enterprise/Tools/schemas" xmlns:A_PROGRAM_RESPONSE_MSG.VERSION_1="http://xmlns.oracle.com/Enterprise/Tools/schemas" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://xmlns.oracle.com/Enterprise/HCM/schemas/A_PROGRAM_SERVICE.1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2002/12/policy">
<wsp:UsagePolicy wsdl:Required="true"/>
<plnk:partnerLinkType name="A_PROGRAM_SERVICE_PartnerLinkType">
<plnk:role name="A_PROGRAM_SERVICE_Provider">
<plnk:portType name="tns:A_PROGRAM_SERVICE_PortType"/>
</plnk:role>
</plnk:partnerLinkType>
<wsdl:types>
<xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://xmlns.oracle.com/Enterprise/Tools/schemas" schemaLocation="A_PROGRAM_REQUEST_MSG.VERSION_1.xsd"/>
<xsd:import namespace="http://xmlns.oracle.com/Enterprise/Tools/schemas" schemaLocation="A_PROGRAM_RESPONSE_MSG.VERSION_1.xsd"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="A_PROGRAM_REQUEST_MSG.VERSION_1">
<wsdl:documentation>A Data Repository</wsdl:documentation>
<wsdl:part element="A_PROGRAM_REQUEST_MSG.VERSION_1:InputParameters" name="parameter"/>
</wsdl:message>
<wsdl:message name="A_PROGRAM_RESPONSE_MSG.VERSION_1">
<wsdl:documentation>A Data Repository</wsdl:documentation>
<wsdl:part element="A_PROGRAM_RESPONSE_MSG.VERSION_1:root" name="parameter"/>
</wsdl:message>
<wsdl:portType name="A_PROGRAM_SERVICE_PortType">
<wsdl:operation name="A_PROGRAM_OP">
<wsdl:documentation>A Data Repository</wsdl:documentation>
<wsdl:input message="tns:A_PROGRAM_REQUEST_MSG.VERSION_1" name="A_PROGRAM_REQUEST_MSG.VERSION_1"/>
<wsdl:output message="tns:A_PROGRAM_RESPONSE_MSG.VERSION_1" name="A_PROGRAM_RESPONSE_MSG.VERSION_1"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="A_PROGRAM_SERVICE_Binding" type="tns:A_PROGRAM_SERVICE_PortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="A_PROGRAM_OP">
<soap:operation soapAction="A_PROGRAM_OP.v1" style="document"/>
<wsp:Policy wsu:Id="UsernameTokenSecurityPolicyPasswordOptional" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsp:ExactlyOne>
<wsp:All>
<wsse:SecurityToken wsp:Usage="wsp:Required" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:TokenType>wsse:UserNameToken</wsse:TokenType>
<Claims>
<SubjectName MatchType="wsse:Exact"/>
<UsePassword wsp:Usage="wsp:Optional"/>
</Claims>
</wsse:SecurityToken>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
<wsdl:input name="A_PROGRAM_REQUEST_MSG.VERSION_1">
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="literal"/>
</wsdl:input>
<wsdl:output name="A_PROGRAM_RESPONSE_MSG.VERSION_1">
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="A_PROGRAM_SERVICE">
<wsdl:documentation>A Data Repository</wsdl:documentation>
<wsdl:port binding="tns:A_PROGRAM_SERVICE_Binding" name="A_PROGRAM_SERVICE_Port">
<soap:address location="http://some_url_here/PSIGW/PeopleSoftServiceListeningConnector/SYSTEMNAME"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
With deeper analysis, I figured it out. One of the imported XSDs has maxOccurs="unbounded" in the root element. This makes no sense because the root element can only appear once in an XML document.
Visual Studio sure could use a more clear error message!
Thanks to #JohnSaunders for helping me think about checking the imports.
Related
I developed a small Outlook plugin that is supposed to be used in a shared mailbox.
The problems are the following:
In the "new" Outlook for mac it can only be opened one time, in the shared Mailbox. After that the Addin is greyed out.
In Outlook on the web the pinning feature can not be used in the shared mailbox
The details:
I added
<DesktopFormFactor>
<SupportsSharedFolders>true</SupportsSharedFolders>
to the manifest, to make it work within a shared mailbox.
One of our users uses a mac and switched to "new Outlook". When he is in the shared mailbox the Addin can be opened once. (Right after opening the personal mailbox) After that the Icon is greyed out and it cant be opened again (only when switching to the personal mailbox and back) . When hovering over the Addin, this message appears:
(Changed the icon, title and email)
In the "old" Outlook for Mac it does seem to work, but the user does not want to use it.
At first i thought maybe it has something to do with the WebApplicationInfo and its authorization but it shows the same behavior without this part.
Interestingly it does also work for a while after a fresh installation. If I freshly add the manifest.xml it can be used for one or two sessions.
In the web client a different problem occurs, the Addin can be loaded in the shared mailbox but the pinning does not work.
Here is the full manifest (without urls and names), I am aware that it does not include a version for the older Outlook versions. But our user base is very limited and everybody uses the latest client.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xsi:type="MailApp">
<Id>{{ID}}</Id>
<Version>1.0.0.0</Version>
<ProviderName>{{Provider}}</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="{{Name}"/>
<Description DefaultValue="{{Description}"/>
<IconUrl DefaultValue="https://test.app/Icon"/>
<HighResolutionIconUrl DefaultValue="https://test.app/Icon2"/>
<SupportUrl DefaultValue="https://test.app/Help"/>
<AppDomains>
<AppDomain>https://test.app/</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Mailbox"/>
</Hosts>
<Requirements>
<Sets DefaultMinVersion="1.1">
<Set Name="Mailbox" MinVersion="1.1"/>
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="https://test.app/pane"/>
<RequestedHeight>250</RequestedHeight>
</DesktopSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteMailbox</Permissions>
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
</Rule>
<DisableEntityHighlighting>false</DisableEntityHighlighting>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
<Requirements>
<bt:Sets DefaultMinVersion="1.3">
<bt:Set Name="Mailbox"/>
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<SupportsSharedFolders>true</SupportsSharedFolders>
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<OfficeTab id="TabDefault">
<Group id="msgReadGroup">
<Label resid="GroupLabel"/>
<Control xsi:type="Button" id="msgReadOpenPaneButton">
<Label resid="TaskpaneButton.Label"/>
<Supertip>
<Title resid="TaskpaneButton.Label"/>
<Description resid="TaskpaneButton.Tooltip"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="Taskpane.Url"/>
<SupportsPinning>true</SupportsPinning>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://test.app/Icon1"/>
<bt:Image id="Icon.32x32" DefaultValue="https://test.app/Icon2"/>
<bt:Image id="Icon.80x80" DefaultValue="https://test.app/Icon3"/>
</bt:Images>
<bt:Urls>
<bt:Url id="Taskpane.Url" DefaultValue="https://test.app/Pane"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="GroupLabel" DefaultValue=""/>
<bt:String id="TaskpaneButton.Label" DefaultValue=""/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Opens a pane displaying all available properties."/>
</bt:LongStrings>
</Resources>
<WebApplicationInfo>
<Id>{{ID}}</Id>
<Resource>{{URI}}</Resource>
<Scopes>
<Scope>offline_access</Scope>
<Scope>openid</Scope>
<Scope>profile</Scope>
<Scope>Mail.ReadWrite.Shared</Scope>
<Scope>Mail.Send.Shared</Scope>
<Scope>User.Read</Scope>
</Scopes>
</WebApplicationInfo>
</VersionOverrides>
</VersionOverrides>
</OfficeApp>
Addins support for group shared mailbox is not yet supported on Outlook on Web. This is mentioned in our documentation here. We track Outlook add-in feature requests on our Tech Community Page. Please submit your request there and choose the appropriate label(s). Feature requests on Tech Community are considered, when we go through our planning process
I am creating a soap service by consuming one wsdl and multiple xsd files. The xsd files are included in my wsdl. I have tried with jaxws and cxf plugins using maven. Both the plugins are throwing error/exception while parsing the wsdl.
below is the error from jaxws:
[ERROR] Invalid wsdl:operation "insertSubscriber": its a document-literal operation, message part must refer to a schema element declaration
CXF dies without throwing any error description.
The jxc framework creates the classes from xsd files but they are of no use because I have to create endpoints manually and the linking of the classes is already defined in my wsdl.
I have also C++ gsoap client which uses the same wsdl and xsds using which I can create my soap service, But I want to migrate my service to a java application. How do I fix the above problem?
wsdl snippet:
<wsdl:import namespace="MyDomain/mytypes" location="MyTypes1.xsd"/>
<xsd:complexType name="insertSubscriberRequest">
<xsd:sequence>
<xsd:element name="insertAddressList" type="mytypes:InsertAddressList"/>
</xsd:sequence>
</xsd:complexType>
<wsdl:message name="insertSubscriberRequest">
<wsdl:part name="insertSubscriberRequest" type="tns:insertSubscriberRequest"/>
</wsdl:message>
<!--wsdl operation-->
<wsdl:portType name="myService">
<wsdl:operation name="insertSubscriber">
<wsdl:input message="tns:insertSubscriberRequest"/>
<wsdl:output message="tns:insertSubscriberResponse"/>
</wsdl:operation>
</wsdl:portType>
<!--soap operation-->
<wsdl:operation name="insertSubscriber">
<soap:operation soapAction="MyDomain/mytypes/insertSubscriber"/>
<wsdl:input>
<soap:body use="literal" namespace="MyDomain/mytypes"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal" namespace="MyDomain/mytypes"/>
</wsdl:output>
</wsdl:operation>
snippet from MyTypes1.xsd:
<xs:complexType name="InsertAddressList">
<xs:annotation>
<xs:documentation>Definition of a list of Account IDs for Insert operation</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="accountId" type="MyType2:sdsAccountId" minOccurs="10" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
snippet from MyTypes2.xsd
<xs:simpleType name="sdsAccountId">
<xs:annotation>
<xs:documentation>Definition of Account ID parameter</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="26"/>
<xs:pattern value="([0..9]){1,26}"/>
</xs:restriction>
</xs:simpleType>
I verified the WSDL file and there was an import error. Actually, It was importing the xsds two times once in the wsdl:definitions and once in the xsd:schema. removing the import from the wsdl:definitions worked for me,
With wsimport I am facing the same issue, but it is working with cxf.
I am trying to deploy a shared library in IIB v10 toolkit integration server which has 1 WSDL created through New->Message Model -> using existing WSDL. It internally imported referencing schema files.B ut while trying to deploy Shared lib project into integration server in toolkit, it's failing with below error:
BIP4395E: Java exception: 'com.ibm.xml.xlxp.compiler.CompilerError';
thrown from class name: 'com.ibm.broker.schemamgr.MbXLXPCompiler',
method name: 'compileSchemas', file: 'MbXLXPCompiler.java', line: '211'
Is it a problem with relative path in wsdl referencing XSD schema files?
<xsd:import namespace="http://test.com/ebo/Basic" schemaLocation="../../mds/ebo/Bsc.xsd"/>
<xsd:import namespace="http://test.com/ebo/header" schemaLocation="../../mds/ebo/header.xsd"/>
<xsd:import namespace="http://test.com/ebo/cpr" schemaLocation="../../mds/ebo/cpr.xsd"/>
Could anyone you please suggest any solution?
Complete error details:
Begin running task [Deploying [TEST1SHARED] to integration server [DEVSERVER]]
BIP2087E: Integration node 'TESTNODE_USER' was unable to process the internal configuration message.
The entire internal configuration message failed to be processed successfully.
Use the messages following this message to determine the reasons for the failure. If the problem cannot be resolved after reviewing these messages, contact your IBM Support center. Enabling service trace may help determine the cause of the failure.
BIP4041E: Integration server 'DEVSERVER' received an administration request that encountered an exception.
While attempting to process an administration request, an exception was encountered. No updates have been made to the configuration of the integration server.
Review related error messages to determine why the administration request failed.
BIP5049E: A failure occurred when the integration server was preparing XML and DFDL schema files for use as part of the deployment of a library.
A failure occurred when the integration server was preparing XML and DFDL schema files for use as part of the deployment of a library. The deployment of the library has failed, and the deployment will be rolled back.
Review previous messages to find out why the error occurred. Be aware that DFDL schema files must also be valid XML Schema files, and that all DFDL schema files are prepared for use by the XMLNSC domain before being prepared for use by the DFDL domain.
BIP4395E: Java exception: 'com.ibm.xml.xlxp.compiler.CompilerError'; thrown from class name: 'com.ibm.broker.schemamgr.MbXLXPCompiler', method name: 'compileSchemas', file: 'MbXLXPCompiler.java', line: '211'
The message contains that data associated with a Java exception.
No user action required.
The task was unsuccessful: The deployment was unsuccessful. Check error messages above for explanation.
Below are my files:
1)Plant_1.0.wsdl
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
name="Plant" targetNamespace="http://test.com/ivs/Plant"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://test.com/ivs/Plant"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:documentation>
Version 1.0
<wsdl:appinfo source="WMQI_APPINFO">
<MRWSDLAppInfo imported="true">
<binding hasEncoding="false" imported="true"
name="Plant.Binding"
originalBindingStyle="document" />
</MRWSDLAppInfo>
</wsdl:appinfo>
</wsdl:documentation>
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://test.com/ivs/Plant"
schemaLocation="Plant_1.0_wsdl.xsd" />
</schema>
</wsdl:types>
<wsdl:message name="getData">
<wsdl:part element="tns:getData" name="payload" />
</wsdl:message>
<wsdl:message name="getDataResponse">
<wsdl:part element="tns:getDataResponse" name="payload" />
</wsdl:message>
<wsdl:portType name="Plant">
<wsdl:operation name="getData">
<wsdl:input message="tns:getData" />
<wsdl:output message="tns:getDataResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="Plant.Binding" type="tns:Plant">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="getData">
<soap:operation soapAction="getData" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>
Plant_1.0_wsdl.xsd(auto generated xsd)
<?xml version="1.0" encoding="UTF-8"?><xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://test.com/ivs/Plant"
xmlns:tns="http://test.com/ivs/Plant">
<xsd:include schemaLocation="Plant_1.0.xsd"/>
</xsd:schema>
Plant_1.0.xsd:
<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://test.com/ivs/Plant" version="1.0" xmlns="http://test.com/ivs/Plant" xmlns:ibmSchExtn="http://www.ibm.com/schema/extensions">
<xsd:element ibmSchExtn:docRoot="true" name="getData" type="GetDataType"/>
<xsd:element ibmSchExtn:docRoot="true" name="getDataResponse" type="GetDataResponseType"/>
<xsd:complexType name="GetDataType">
<xsd:sequence>
<xsd:element name="body">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="subDataType" type="xsd:string"/>
<xsd:element name="fromDateTime" type="xsd:dateTime"/>
<xsd:element name="toDateTime" type="xsd:dateTime"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="GetDataResponseType">
<xsd:sequence>
<xsd:element name="body">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="result" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
Thanks
IIB have a specific way to handle WSDL / XSD : usually, a WSDL contains a XSD, but IIB consider it should be in two different files (that's what it does when you import an existing WSDL, it split it into different files)
You can do what you are trying to achieve in a different way : your XSD import should be done in the .xsd generated while importing the WSDL, instead of being done in the .wsdl directly.
A small extract from one of my WSDL / XSD referencing another XSD :
XXX.wsdl :
[...]
<wsdl:types>
<xsd:schema
targetNamespace="http://toto.org/XXXX">
<xsd:include schemaLocation="XXXX_InlineSchema1.xsd" />
</xsd:schema>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import
namespace="http://toto.org/XXXX"
schemaLocation="XXXX_InlineSchema1.xsd">
</xsd:import>
</xsd:schema>
</wsdl:types>
[...]
XXXX_InlineSchema1.xsd :
[...]
<xsd:import namespace="http://test.com/ebo/Basic" schemaLocation="../../mds/ebo/Bsc.xsd"/>
<xsd:import namespace="http://test.com/ebo/header" schemaLocation="../../mds/ebo/header.xsd"/>
<xsd:import namespace="http://test.com/ebo/cpr" schemaLocation="../../mds/ebo/cpr.xsd"/>
[...]
This issue is best demonstrated by example. Consider the following:
In the first example, my <Permissions/> element is placed immediately after the <FormSettings/> block:
<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xsi:type="MailApp">
<Id>464672b2-35a8-44a1-8c06-3ad07ed893a7</Id>
<Version>1.0.0.0</Version>
<ProviderName>Example</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Example A"/>
<Description DefaultValue="This is an example add-in."/>
<IconUrl DefaultValue="https://placehold.it/64x64"/>
<HighResolutionIconUrl DefaultValue="https://placehold.it/64x64"/>
<SupportUrl DefaultValue="https://example.com/"/>
<Hosts>
<Host Name="Mailbox"/>
</Hosts>
<Requirements>
<Sets>
<Set Name="MailBox" MinVersion="1.1"/>
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemEdit">
<DesktopSettings>
<SourceLocation DefaultValue="https://example.com"/>
</DesktopSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteMailbox</Permissions>
<Rule xsi:type="RuleCollection" Mode="And">
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Edit"/>
</Rule>
</OfficeApp>
I am able to successfully add this manifest to my Exchange Admin Center's organization add-ins list.
However, if I move the <Permissions/> element anywhere else in the manifest, the manifest fails validation when attempting to add it:
<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xsi:type="MailApp">
<Id>464672b2-35a8-44a1-8c06-3ad07ed893a7</Id>
<Version>1.0.0.0</Version>
<ProviderName>Example</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Example A"/>
<Description DefaultValue="This is an example add-in."/>
<IconUrl DefaultValue="https://placehold.it/64x64"/>
<HighResolutionIconUrl DefaultValue="https://placehold.it/64x64"/>
<SupportUrl DefaultValue="https://example.com/"/>
<Hosts>
<Host Name="Mailbox"/>
</Hosts>
<Requirements>
<Sets>
<Set Name="MailBox" MinVersion="1.1"/>
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemEdit">
<DesktopSettings>
<SourceLocation DefaultValue="https://example.com"/>
</DesktopSettings>
</Form>
</FormSettings>
<Rule xsi:type="RuleCollection" Mode="And">
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Edit"/>
</Rule>
<Permissions>ReadWriteMailbox</Permissions>
</OfficeApp>
Attempting to add this manifest to my Exchange Admin Center's organization add-ins list produces the following error:
This app can't be installed. The manifest file doesn't conform to the schema definition. The element 'OfficeApp' in namespace 'http://schemas.microsoft.com/office/appforoffice/1.1' has invalid child element 'Permissions' in namespace 'http://schemas.microsoft.com/office/appforoffice/1.1'. List of possible elements expected: 'DisableEntityHighlighting' in namespace 'http://schemas.microsoft.com/office/appforoffice/1.1' as well as 'VersionOverrides' in namespace 'http://schemas.microsoft.com/office/mailappversionoverrides' as well as any element in namespace 'http://www.w3.org/2000/09/xmldsig#'...
It is only through trial and error were we able to find the root cause of this validation failure.
My question: Why does ordering matter? Why can the <Permissions/> element not appear anywhere within the same nesting level in the manifest?
Context
This validation failure occurs in hosted Exchange (Office 365), and also when attempting to submit an add-in to the Office Store, at the step where a manifest is requested.
Why does ordering matter?
Order of the tags defined by schema file. In your case you have included in the manifest http://schemas.microsoft.com/office/appforoffice/1.1 Schema. Try to find in the schema <Permissions/> element and you will see the following definition ...
<xs:complexType name="MailApp">
<xs:complexContent>
<xs:extension base="OfficeApp">
<xs:sequence>
<xs:element name="Requirements" type="MailAppRequirements" minOccurs="1" maxOccurs="1"/>
<xs:element name="FormSettings" type="FormSettings" minOccurs="1" maxOccurs="1"/>
<xs:element name="Permissions" minOccurs="0" maxOccurs="1" type="ST_Permissions2"/>
<xs:element name="Rule" type="Rule" minOccurs="1" maxOccurs="1"/>
<xs:element name="DisableEntityHighlighting" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
<xs:element ref="mailor:VersionOverrides" minOccurs="0" maxOccurs="1"/>
<xs:any id="MailAppSignature" minOccurs="0" maxOccurs="1" namespace="http://www.w3.org/2000/09/xmldsig#" processContents="lax"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
Element <Permissions/> is in the <sequence/> which means it must be in order defined by this element and it's right after <FormSettings/> and nowhere elese.
Order of the tags defined by schema file. Unfortunately this is not well documented and we are working to improve this documentation. Order matters when defining a manifest for Outlook web add-ins because of the way we validate the schema for installation. We realize this can be a hassle especially since it's not well documented but the main reason we require a specific order is because it allows us to validate the manifest content quickly and increase performance of the service.
Thank you for providing this feedback on our documentation.
I am using Savon with the following WSDL
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:v2bind="urn:oasis:names:tc:wsrp:v2:bind" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="urn:oasis:names:tc:wsrp:v2:wsdl">
<import namespace="urn:oasis:names:tc:wsrp:v2:bind" location="http://localhost:8080/wsrp-portlet/wsdl/wsrp-2.0-bindings.wsdl"/>
<wsdl:service name="WSRP_v2_Service">
<wsdl:port binding="v2bind:WSRP_v2_Markup_Binding_SOAP" name="WSRP_v2_Markup_Service">
<soap:address location="http://localhost:8080/wsrp-portlet/services/WSRP_v2_Markup_Service?wsrpProducerUuid=48322cfd-c68b-4053-b9b4-aff1644d6e1e"/>
</wsdl:port>
<wsdl:port binding="v2bind:WSRP_v2_ServiceDescription_Binding_SOAP" name="WSRP_v2_ServiceDescription_Service">
<soap:address location="http://localhost:8080/wsrp-portlet/services/WSRP_v2_ServiceDescription_Service?wsrpProducerUuid=48322cfd-c68b-4053-b9b4-aff1644d6e1e"/>
</wsdl:port>
<wsdl:port binding="v2bind:WSRP_v2_Registration_Binding_SOAP" name="WSRP_v2_Registration_Service">
<soap:address location="http://localhost:8080/wsrp-portlet/services/WSRP_v2_Registration_Service?wsrpProducerUuid=48322cfd-c68b-4053-b9b4-aff1644d6e1e"/>
</wsdl:port>
<wsdl:port binding="v2bind:WSRP_v2_PortletManagement_Binding_SOAP" name="WSRP_v2_PortletManagement_Service">
<soap:address location="http://localhost:8080/wsrp-portlet/services/WSRP_v2_PortletManagement_Service?wsrpProducerUuid=48322cfd-c68b-4053-b9b4-aff1644d6e1e"/>
</wsdl:port>
</wsdl:service>
When I inspect,
savon.wsdl.endpoint
I only get,
#<URI::HTTP:0x00000101eea398 URL:http://localhost:8080/wsrp-portlet/services/WSRP_v2_Markup_Service?wsrpProducerUuid=48322cfd-c68b-4053-b9b4-aff1644d6e1e>
Can savon handle a wsdl with multiple port definitions? If not any suggestions on a ruby alternative that does support it?
I have been seeing the same thing with Savon. I can manually change the endpoint by setting the endpoint explicitly with
Savon.client do
wsdl.endpoint = "http://service.example.com"
end