Event Subscription

Discussions related to custom development with Select.
mmregan
Posts: 17
Joined: Tue Mar 09, 2010 2:27 pm

Event Subscription

Post by mmregan »

I am getting an error when trying to subscribe to an event in v3.0. The sps.exe tool is throwing the following error from the command line:
Could not find schema information for the element 'http://schemas.softprocorp.com/select/i ... scriptions'.
Could not find schema information for the element 'http://schemas.softprocorp.com/select/i ... scriptions'.
at SoftPro.Select.CommandLine.Commands.SubscribeCommand.<Run>b__2(Object sender, ValidationEventArgs e)
at System.Xml.Schema.XmlSchemaValidator.ValidateElement(String localName, String namespaceUri, XmlSchemaInfo schemaInfo, String xsiType, String xsiNil, String xsiSchemaLocation, String xsiNoNamespaceSchemaLocation)
at System.Xml.XsdValidatingReader.ProcessElementEvent()
at System.Xml.XsdValidatingReader.Read()
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at SoftPro.Select.CommandLine.Commands.SubscribeCommand.Run()
at SoftPro.Select.CommandLine.Program.RunCommand(String[] args)
The XML I am trying to register with is:

Code: Select all

<Subscriptions xmlns="http://schemas.softprocorp.com/select/integration/registration/2008/04">
  <Subscription eventid="C3088264-4F52-4256-9132-CCB0B9FF0906">
    <Filter />
    <Transform />
    <DeliveryKind>soap12</DeliveryKind>
    <DeliveryAddress>http://win7-iis7-test:8082/TaskChangedListenerService.svc</DeliveryAddress>
    <Guaranteed>true</Guaranteed>
  </Subscription>
</Subscriptions>
This same XML worked to subscribe in 2.6 (less the Guaranteed tag).
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: Event Subscription

Post by John Morris »

Your namespace in the Subscription tag is incorrect. Try this one:

Code: Select all

http://schemas.softprocorp.com/select/notifications/eventing/2008/04
John Morris
Sr. Software Architect
SoftPro
mmregan
Posts: 17
Joined: Tue Mar 09, 2010 2:27 pm

Re: Event Subscription

Post by mmregan »

Thanks John. Seems not only did I have the namespace address wrong, but several of the attributes/elements changed as well.

Final XML that led to a successful subscription:

Code: Select all

<Subscriptions xmlns="http://schemas.softprocorp.com/select/notifications/eventing/2008/04">
  <Subscription event="C3088264-4F52-4256-9132-CCB0B9FF0906">
    <Filter />
    <Transform />
    <Delivery>soap12</Delivery>
    <Address>http://webserver:8082/TaskChangedListenerService.svc</Address>
    <Guaranteed>true</Guaranteed>
  </Subscription>
</Subscriptions>
mrisen
Posts: 98
Joined: Wed Jul 25, 2012 7:01 pm

Re: Event Subscription

Post by mrisen »

Is the schema posted somewhere? I'm trying to register. The solution below moved me from schema not found to Security Error. Here's my file contents:

<Subscriptions xmlns="schemas.softprocorp.com/select/notifications/eventing/2008/04">
<Subscription eventid="C4EDBD4F-F11D-4C48-BE08-8C105181F5C9">
<Filter />
<Transform />
<Delivery>soap12</Delivery>
<Address>http://servername/etc/service.svc</Address>
<Guaranteed>true</Guaranteed>
</Subscription>
</Subscriptions>

And I'm getting:

Security error.
Security error.
at SoftPro.ClientModel.Server.EnsureAuthenticated()
at SoftPro.ClientModel.Server.GetService(Type serviceType, Boolean ensureAuthenticated)
at SoftPro.ClientModel.Server.GetService(Type serviceType)
at SoftPro.Select.Client.SelectServer.GetService(Type serviceType)
at SoftPro.Select.Client.SelectServer.GetService[T]()
at SoftPro.Select.Client.SelectServer.Dispose()
at SoftPro.Select.CommandLine.Commands.ServerCommand.Dispose(Boolean disposing)
at SoftPro.Select.CommandLine.Program.RunCommand(String[] args)
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: Event Subscription

Post by John Morris »

What is the command line arguments you're using?
John Morris
Sr. Software Architect
SoftPro
mrisen
Posts: 98
Joined: Wed Jul 25, 2012 7:01 pm

Re: Event Subscription

Post by mrisen »

C:\Program Files (x86)\SoftPro\Select>sps.exe subscribe /server:http://softproserver:8080 file.xml
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: Event Subscription

Post by John Morris »

When you run the tool with that command line, it will use your windows account credentials to connect to the server. You can opt to pass explicit credentials using the /u argument, like so:

Code: Select all

C:\Program Files (x86)\SoftPro\Select>sps.exe subscribe /server:http://softproserver:8080 /u:"admin,Passw0rd" file.xml
John Morris
Sr. Software Architect
SoftPro
mrisen
Posts: 98
Joined: Wed Jul 25, 2012 7:01 pm

Re: Event Subscription

Post by mrisen »

Ok, that appears to have gotten me further, but I'm back to schema errors:

Could not find schema information for the element 'schemas.softprocorp.com/select/notifications/eventing/2008/04:Subscriptions'.
Could not find schema information for the element 'schemas.softprocorp.com/select/notifications/eventing/2008/04:Subscriptions'.
at SoftPro.Select.CommandLine.Commands.SubscribeCommand.<Run>b__2(Object sender, ValidationEventArgs e)
at System.Xml.Schema.XmlSchemaValidator.ValidateElement(String localName, String namespaceUri, XmlSchemaInfo schemaInfo, String xsiType, String xsi
Nil, String xsiSchemaLocation, String xsiNoNamespaceSchemaLocation)
at System.Xml.XsdValidatingReader.ProcessElementEvent()
at System.Xml.XsdValidatingReader.Read()
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at SoftPro.Select.CommandLine.Commands.SubscribeCommand.Run()
at SoftPro.Select.CommandLine.Program.RunCommand(String[] args)

I also tried with what I think is the 2.6 schema but got much the same:

Could not find schema information for the element 'http://schemas.softprocorp.com/select/i ... scriptions'.
Could not find schema information for the element 'http://schemas.softprocorp.com/select/i ... scriptions'.
at SoftPro.Select.CommandLine.Commands.SubscribeCommand.<Run>b__2(Object sender, ValidationEventArgs e)
at System.Xml.Schema.XmlSchemaValidator.ValidateElement(String localName, String namespaceUri, XmlSchemaInfo schemaInfo, String xsiType, String xsi
Nil, String xsiSchemaLocation, String xsiNoNamespaceSchemaLocation)
at System.Xml.XsdValidatingReader.ProcessElementEvent()
at System.Xml.XsdValidatingReader.Read()
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at SoftPro.Select.CommandLine.Commands.SubscribeCommand.Run()
at SoftPro.Select.CommandLine.Program.RunCommand(String[] args)
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: Event Subscription

Post by John Morris »

Can you post your subscription xml document?
John Morris
Sr. Software Architect
SoftPro
mrisen
Posts: 98
Joined: Wed Jul 25, 2012 7:01 pm

Re: Event Subscription

Post by mrisen »

It is the same as above.
Post Reply